Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h

Issue 18334003: Linux status icon for Ubuntu Unity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: file restored Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 #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_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/status_icons/desktop_notification_balloon.h"
10 #include "chrome/browser/status_icons/status_icon.h"
11 #include "ui/linux_ui/linux_ui.h"
12
13 // Wrapper class for StatusIconLinux that implements the standard StatusIcon
14 // interface. Also handles callbacks from StatusIconLinux.
15 class StatusIconLinuxWrapper : public StatusIcon,
16 public StatusIconLinux::Delegate {
17 public:
18 // StatusIcon overrides:
19 virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE;
20 virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE;
21 virtual void SetToolTip(const string16& tool_tip) OVERRIDE;
22 virtual void SetClickActionLabel(const string16& label) OVERRIDE;
23 virtual void DisplayBalloon(const gfx::ImageSkia& icon,
24 const string16& title,
25 const string16& contents) OVERRIDE;
26
27 // StatusIconLinux::Delegate overrides:
28 virtual void OnClick() OVERRIDE;
29
30 static StatusIconLinuxWrapper* CreateWrappedStatusIcon();
31
32 protected:
33 // StatusIcon overrides:
34 // Invoked after a call to SetContextMenu() to let the platform-specific
35 // subclass update the native context menu based on the new model. If NULL is
36 // passed, subclass should destroy the native context menu.
37 virtual void UpdatePlatformContextMenu(ui::MenuModel* model) OVERRIDE;
38
39 private:
40 // A status icon wrapper should only be created by calling
41 // CreateWrappedStatusIcon().
42 explicit StatusIconLinuxWrapper(StatusIconLinux* status_icon);
43
44 // Notification balloon.
45 DesktopNotificationBalloon notification_;
46 scoped_ptr<StatusIconLinux> status_icon_;
47
48 DISALLOW_COPY_AND_ASSIGN(StatusIconLinuxWrapper);
49 };
50
51 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_LINUX_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698