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 <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "chrome/browser/status_icons/desktop_notification_balloon.h" | 11 #include "chrome/browser/status_icons/desktop_notification_balloon.h" |
11 #include "chrome/browser/status_icons/status_icon.h" | 12 #include "chrome/browser/status_icons/status_icon.h" |
12 #include "ui/views/linux_ui/status_icon_linux.h" | 13 #include "ui/views/linux_ui/status_icon_linux.h" |
13 | 14 |
14 // Wrapper class for StatusIconLinux that implements the standard StatusIcon | 15 // Wrapper class for StatusIconLinux that implements the standard StatusIcon |
15 // interface. Also handles callbacks from StatusIconLinux. | 16 // interface. Also handles callbacks from StatusIconLinux. |
16 class StatusIconLinuxWrapper : public StatusIcon, | 17 class StatusIconLinuxWrapper : public StatusIcon, |
17 public views::StatusIconLinux::Delegate, | 18 public views::StatusIconLinux::Delegate, |
18 public StatusIconMenuModel::Observer { | 19 public StatusIconMenuModel::Observer { |
19 public: | 20 public: |
(...skipping 26 matching lines...) Expand all Loading... |
46 void UpdatePlatformContextMenu(StatusIconMenuModel* model) override; | 47 void UpdatePlatformContextMenu(StatusIconMenuModel* model) override; |
47 | 48 |
48 private: | 49 private: |
49 // A status icon wrapper should only be created by calling | 50 // A status icon wrapper should only be created by calling |
50 // CreateWrappedStatusIcon(). | 51 // CreateWrappedStatusIcon(). |
51 explicit StatusIconLinuxWrapper(views::StatusIconLinux* status_icon); | 52 explicit StatusIconLinuxWrapper(views::StatusIconLinux* status_icon); |
52 | 53 |
53 // Notification balloon. | 54 // Notification balloon. |
54 DesktopNotificationBalloon notification_; | 55 DesktopNotificationBalloon notification_; |
55 | 56 |
56 scoped_ptr<views::StatusIconLinux> status_icon_; | 57 std::unique_ptr<views::StatusIconLinux> status_icon_; |
57 | 58 |
58 StatusIconMenuModel* menu_model_; | 59 StatusIconMenuModel* menu_model_; |
59 | 60 |
60 DISALLOW_COPY_AND_ASSIGN(StatusIconLinuxWrapper); | 61 DISALLOW_COPY_AND_ASSIGN(StatusIconLinuxWrapper); |
61 }; | 62 }; |
62 | 63 |
63 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ | 64 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_ |
OLD | NEW |