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

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

Issue 23922007: Merge the LinuxUI interface from its own .so into libviews.so. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/linux_ui/linux_ui.gyp ('k') | ui/views/linux_ui/status_icon_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 UI_LINUX_UI_STATUS_ICON_LINUX_H_ 5 #ifndef UI_VIEWS_LINUX_UI_STATUS_ICON_LINUX_H_
6 #define UI_LINUX_UI_STATUS_ICON_LINUX_H_ 6 #define UI_VIEWS_LINUX_UI_STATUS_ICON_LINUX_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "ui/linux_ui/linux_ui_export.h" 9 #include "ui/views/views_export.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 class ImageSkia; 12 class ImageSkia;
13 } 13 }
14 14
15 namespace ui { 15 namespace ui {
16 class MenuModel; 16 class MenuModel;
17 } // namespace ui 17 } // namespace ui
18 18
19 namespace views {
20
19 // Since liblinux_ui cannot have dependencies on any chrome browser components 21 // Since liblinux_ui cannot have dependencies on any chrome browser components
20 // we cannot inherit from StatusIcon. So we implement the necessary methods 22 // we cannot inherit from StatusIcon. So we implement the necessary methods
21 // and let a wrapper class implement the StatusIcon interface and defer the 23 // and let a wrapper class implement the StatusIcon interface and defer the
22 // callbacks to a delegate. For the same reason, do not use StatusIconMenuModel. 24 // callbacks to a delegate. For the same reason, do not use StatusIconMenuModel.
23 class LINUX_UI_EXPORT StatusIconLinux { 25 class VIEWS_EXPORT StatusIconLinux {
24 public: 26 public:
25 class Delegate { 27 class Delegate {
26 public: 28 public:
27 virtual void OnClick() = 0; 29 virtual void OnClick() = 0;
28 virtual bool HasClickAction() = 0; 30 virtual bool HasClickAction() = 0;
29 31
30 protected: 32 protected:
31 virtual ~Delegate(); 33 virtual ~Delegate();
32 }; 34 };
33 35
(...skipping 14 matching lines...) Expand all
48 // need to manually refresh it when the menu model changes. 50 // need to manually refresh it when the menu model changes.
49 virtual void RefreshPlatformContextMenu(); 51 virtual void RefreshPlatformContextMenu();
50 52
51 Delegate* delegate() { return delegate_; } 53 Delegate* delegate() { return delegate_; }
52 void set_delegate(Delegate* delegate) { delegate_ = delegate; } 54 void set_delegate(Delegate* delegate) { delegate_ = delegate; }
53 55
54 private: 56 private:
55 Delegate* delegate_; 57 Delegate* delegate_;
56 }; 58 };
57 59
60 } // namespace views
61
58 #endif // UI_LINUX_UI_STATUS_ICON_LINUX_H_ 62 #endif // UI_LINUX_UI_STATUS_ICON_LINUX_H_
OLDNEW
« no previous file with comments | « ui/views/linux_ui/linux_ui.gyp ('k') | ui/views/linux_ui/status_icon_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698