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/linux_ui/linux_ui.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 StatusIconLinux::Delegate, | 16 public views::StatusIconLinux::Delegate, |
17 public StatusIconMenuModel::Observer { | 17 public StatusIconMenuModel::Observer { |
18 public: | 18 public: |
19 virtual ~StatusIconLinuxWrapper(); | 19 virtual ~StatusIconLinuxWrapper(); |
20 | 20 |
21 // StatusIcon overrides: | 21 // StatusIcon overrides: |
22 virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; | 22 virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; |
23 virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE; | 23 virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE; |
24 virtual void SetToolTip(const string16& tool_tip) OVERRIDE; | 24 virtual void SetToolTip(const string16& tool_tip) OVERRIDE; |
25 virtual void DisplayBalloon(const gfx::ImageSkia& icon, | 25 virtual void DisplayBalloon(const gfx::ImageSkia& icon, |
26 const string16& title, | 26 const string16& title, |
(...skipping 14 matching lines...) Expand all Loading... |
41 // StatusIcon overrides: | 41 // StatusIcon overrides: |
42 // Invoked after a call to SetContextMenu() to let the platform-specific | 42 // Invoked after a call to SetContextMenu() to let the platform-specific |
43 // subclass update the native context menu based on the new model. If NULL is | 43 // subclass update the native context menu based on the new model. If NULL is |
44 // passed, subclass should destroy the native context menu. | 44 // passed, subclass should destroy the native context menu. |
45 virtual void UpdatePlatformContextMenu( | 45 virtual void UpdatePlatformContextMenu( |
46 StatusIconMenuModel* model) OVERRIDE; | 46 StatusIconMenuModel* model) OVERRIDE; |
47 | 47 |
48 private: | 48 private: |
49 // A status icon wrapper should only be created by calling | 49 // A status icon wrapper should only be created by calling |
50 // CreateWrappedStatusIcon(). | 50 // CreateWrappedStatusIcon(). |
51 explicit StatusIconLinuxWrapper(StatusIconLinux* status_icon); | 51 explicit StatusIconLinuxWrapper(views::StatusIconLinux* status_icon); |
52 | 52 |
53 // Notification balloon. | 53 // Notification balloon. |
54 DesktopNotificationBalloon notification_; | 54 DesktopNotificationBalloon notification_; |
55 | 55 |
56 scoped_ptr<StatusIconLinux> status_icon_; | 56 scoped_ptr<views::StatusIconLinux> status_icon_; |
57 | 57 |
58 StatusIconMenuModel* menu_model_; | 58 StatusIconMenuModel* menu_model_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(StatusIconLinuxWrapper); | 60 DISALLOW_COPY_AND_ASSIGN(StatusIconLinuxWrapper); |
61 }; | 61 }; |
62 | 62 |
63 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ | 63 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ |
OLD | NEW |