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

Side by Side Diff: ui/linux_ui/status_icon_linux.h

Issue 18334003: Linux status icon for Ubuntu Unity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved skia utils to skia_utils_gtk2 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
« ui/linux_ui/linux_ui.h ('K') | « ui/linux_ui/linux_ui.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_LINUX_UI_STATUS_ICON_LINUX_H_
6 #define UI_LINUX_UI_STATUS_ICON_LINUX_H_
7
8 #include "base/strings/string16.h"
9
10 namespace gfx {
11 class ImageSkia;
12 }
13
14 namespace ui {
15 class MenuModel;
16 } // namespace ui
17
18 // Since liblinux_ui cannot have dependencies on any chrome browser components
19 // we cannot inherit from StatusIcon. So we implement the necessary methods
20 // and let a wrapper class implement the StatusIcon interface and defer the
21 // callbacks to a delegate.
22 class StatusIconLinux {
23 public:
24 class Delegate {
25 public:
26 virtual void OnClick() = 0;
27 };
sky 2013/07/15 20:41:10 Add a protected virtual destructor.
sidharthms 2013/07/16 01:12:05 Done.
28
29 virtual ~StatusIconLinux() {}
30
31 virtual void SetImage(const gfx::ImageSkia& image) = 0;
32 virtual void SetPressedImage(const gfx::ImageSkia& image) = 0;
33 virtual void SetToolTip(const string16& tool_tip) = 0;
34 virtual void SetClickActionLabel(const string16& label) = 0;
35
36 // Invoked after a call to SetContextMenu() to let the platform-specific
37 // subclass update the native context menu based on the new model. If NULL is
38 // passed, subclass should destroy the native context menu.
sky 2013/07/15 20:41:10 This comment isn't particularly clear. Doesn't the
sidharthms 2013/07/16 01:12:05 Done.
39 virtual void UpdatePlatformContextMenu(ui::MenuModel* model) = 0;
40
41 Delegate* delegate() { return delegate_; }
42 void set_delegate(Delegate* delegate) { delegate_ = delegate; }
43
44 private:
45 Delegate* delegate_;
sky 2013/07/15 20:41:10 Constructor needs to initialize this to NULL.
sidharthms 2013/07/16 01:12:05 Done.
46 };
47
48 #endif // UI_LINUX_UI_STATUS_ICON_LINUX_H_
OLDNEW
« ui/linux_ui/linux_ui.h ('K') | « ui/linux_ui/linux_ui.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698