OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/status_icons/desktop_notification_balloon.h" | 9 #include "chrome/browser/status_icons/desktop_notification_balloon.h" |
10 #include "chrome/browser/status_icons/status_icon.h" | 10 #include "chrome/browser/status_icons/status_icon.h" |
11 #include "ui/views/linux_ui/status_icon_linux.h" | 11 #include "ui/views/linux_ui/status_icon_linux.h" |
12 | 12 |
13 // Wrapper class for StatusIconLinux that implements the standard StatusIcon | 13 // Wrapper class for StatusIconLinux that implements the standard StatusIcon |
14 // interface. Also handles callbacks from StatusIconLinux. | 14 // interface. Also handles callbacks from StatusIconLinux. |
15 class StatusIconLinuxWrapper : public StatusIcon, | 15 class StatusIconLinuxWrapper : public StatusIcon, |
16 public views::StatusIconLinux::Delegate, | 16 public views::StatusIconLinux::Delegate, |
17 public StatusIconMenuModel::Observer { | 17 public StatusIconMenuModel::Observer { |
18 public: | 18 public: |
19 ~StatusIconLinuxWrapper() override; | 19 ~StatusIconLinuxWrapper() override; |
20 | 20 |
21 // StatusIcon overrides: | 21 // StatusIcon overrides: |
22 void SetImage(const gfx::ImageSkia& image) override; | 22 void SetImage(const gfx::ImageSkia& image) override; |
23 void SetToolTip(const base::string16& tool_tip) override; | 23 void SetToolTip(const base::string16& tool_tip) override; |
24 void DisplayBalloon(const gfx::ImageSkia& icon, | 24 void DisplayBalloon(const gfx::ImageSkia& icon, |
25 const base::string16& title, | 25 const base::string16& title, |
26 const base::string16& contents) override; | 26 const base::string16& contents, |
| 27 const message_center::NotifierId& notifier_id) override; |
27 | 28 |
28 // StatusIconLinux::Delegate overrides: | 29 // StatusIconLinux::Delegate overrides: |
29 void OnClick() override; | 30 void OnClick() override; |
30 bool HasClickAction() override; | 31 bool HasClickAction() override; |
31 | 32 |
32 // StatusIconMenuModel::Observer overrides: | 33 // StatusIconMenuModel::Observer overrides: |
33 void OnMenuStateChanged() override; | 34 void OnMenuStateChanged() override; |
34 | 35 |
35 static StatusIconLinuxWrapper* CreateWrappedStatusIcon( | 36 static StatusIconLinuxWrapper* CreateWrappedStatusIcon( |
36 const gfx::ImageSkia& image, | 37 const gfx::ImageSkia& image, |
(...skipping 15 matching lines...) Expand all Loading... |
52 DesktopNotificationBalloon notification_; | 53 DesktopNotificationBalloon notification_; |
53 | 54 |
54 scoped_ptr<views::StatusIconLinux> status_icon_; | 55 scoped_ptr<views::StatusIconLinux> status_icon_; |
55 | 56 |
56 StatusIconMenuModel* menu_model_; | 57 StatusIconMenuModel* menu_model_; |
57 | 58 |
58 DISALLOW_COPY_AND_ASSIGN(StatusIconLinuxWrapper); | 59 DISALLOW_COPY_AND_ASSIGN(StatusIconLinuxWrapper); |
59 }; | 60 }; |
60 | 61 |
61 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ |
OLD | NEW |