Home | History | Annotate | Download | only in status_icons
      1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "chrome/browser/ui/views/status_icons/status_tray_linux.h"
      6 
      7 #if !defined(OS_CHROMEOS)
      8 #include "chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h"
      9 #include "ui/views/linux_ui/linux_ui.h"
     10 
     11 StatusTrayLinux::StatusTrayLinux() {
     12 }
     13 
     14 StatusTrayLinux::~StatusTrayLinux() {
     15 }
     16 
     17 StatusIcon* StatusTrayLinux::CreatePlatformStatusIcon(
     18     StatusIconType type,
     19     const gfx::ImageSkia& image,
     20     const base::string16& tool_tip) {
     21   return StatusIconLinuxWrapper::CreateWrappedStatusIcon(image, tool_tip);
     22 }
     23 
     24 StatusTray* StatusTray::Create() {
     25   const views::LinuxUI* linux_ui = views::LinuxUI::instance();
     26 
     27   // Only create a status tray if we can actually create status icons.
     28   if (linux_ui && linux_ui->IsStatusIconSupported())
     29     return new StatusTrayLinux();
     30   return NULL;
     31 }
     32 #else  // defined(OS_CHROMEOS)
     33 StatusTray* StatusTray::Create() {
     34   return NULL;
     35 }
     36 #endif
     37