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