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

Side by Side Diff: chrome/browser/ui/views/frame/global_menu_bar_x11.h

Issue 686463004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
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_FRAME_GLOBAL_MENU_BAR_X11_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_X11_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_X11_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_X11_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // opportunistically dlopen() since not everyone is running Ubuntu. 51 // opportunistically dlopen() since not everyone is running Ubuntu.
52 class GlobalMenuBarX11 : public AvatarMenuObserver, 52 class GlobalMenuBarX11 : public AvatarMenuObserver,
53 public chrome::BrowserListObserver, 53 public chrome::BrowserListObserver,
54 public CommandObserver, 54 public CommandObserver,
55 public content::NotificationObserver, 55 public content::NotificationObserver,
56 public TabRestoreServiceObserver, 56 public TabRestoreServiceObserver,
57 public views::DesktopWindowTreeHostObserverX11 { 57 public views::DesktopWindowTreeHostObserverX11 {
58 public: 58 public:
59 GlobalMenuBarX11(BrowserView* browser_view, 59 GlobalMenuBarX11(BrowserView* browser_view,
60 BrowserDesktopWindowTreeHostX11* host); 60 BrowserDesktopWindowTreeHostX11* host);
61 virtual ~GlobalMenuBarX11(); 61 ~GlobalMenuBarX11() override;
62 62
63 // Creates the object path for DbusemenuServer which is attached to |xid|. 63 // Creates the object path for DbusemenuServer which is attached to |xid|.
64 static std::string GetPathForWindow(unsigned long xid); 64 static std::string GetPathForWindow(unsigned long xid);
65 65
66 private: 66 private:
67 struct HistoryItem; 67 struct HistoryItem;
68 typedef std::map<int, DbusmenuMenuitem*> CommandIDMenuItemMap; 68 typedef std::map<int, DbusmenuMenuitem*> CommandIDMenuItemMap;
69 69
70 // Builds a separator. 70 // Builds a separator.
71 DbusmenuMenuitem* BuildSeparator(); 71 DbusmenuMenuitem* BuildSeparator();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // This will remove all menu items in |menu| with |tag| as their tag. This 116 // This will remove all menu items in |menu| with |tag| as their tag. This
117 // clears state about HistoryItems* that we keep to prevent that data from 117 // clears state about HistoryItems* that we keep to prevent that data from
118 // going stale. That's why this method recurses into its child menus. 118 // going stale. That's why this method recurses into its child menus.
119 void ClearMenuSection(DbusmenuMenuitem* menu, int tag_id); 119 void ClearMenuSection(DbusmenuMenuitem* menu, int tag_id);
120 120
121 // Deleter function for HistoryItem implementation detail. 121 // Deleter function for HistoryItem implementation detail.
122 static void DeleteHistoryItem(void* void_item); 122 static void DeleteHistoryItem(void* void_item);
123 123
124 // Overridden from AvatarMenuObserver: 124 // Overridden from AvatarMenuObserver:
125 virtual void OnAvatarMenuChanged(AvatarMenu* avatar_menu) override; 125 void OnAvatarMenuChanged(AvatarMenu* avatar_menu) override;
126 126
127 // Overridden from chrome::BrowserListObserver: 127 // Overridden from chrome::BrowserListObserver:
128 virtual void OnBrowserSetLastActive(Browser* browser) override; 128 void OnBrowserSetLastActive(Browser* browser) override;
129 129
130 // Overridden from CommandObserver: 130 // Overridden from CommandObserver:
131 virtual void EnabledStateChangedForCommand(int id, bool enabled) override; 131 void EnabledStateChangedForCommand(int id, bool enabled) override;
132 132
133 // Overridden from content::NotificationObserver: 133 // Overridden from content::NotificationObserver:
134 virtual void Observe(int type, 134 void Observe(int type,
135 const content::NotificationSource& source, 135 const content::NotificationSource& source,
136 const content::NotificationDetails& details) override; 136 const content::NotificationDetails& details) override;
137 137
138 // Overridden from TabRestoreServiceObserver: 138 // Overridden from TabRestoreServiceObserver:
139 virtual void TabRestoreServiceChanged(TabRestoreService* service) override; 139 void TabRestoreServiceChanged(TabRestoreService* service) override;
140 virtual void TabRestoreServiceDestroyed(TabRestoreService* service) override; 140 void TabRestoreServiceDestroyed(TabRestoreService* service) override;
141 141
142 // Overridden from views::DesktopWindowTreeHostObserverX11: 142 // Overridden from views::DesktopWindowTreeHostObserverX11:
143 virtual void OnWindowMapped(unsigned long xid) override; 143 void OnWindowMapped(unsigned long xid) override;
144 virtual void OnWindowUnmapped(unsigned long xid) override; 144 void OnWindowUnmapped(unsigned long xid) override;
145 145
146 CHROMEG_CALLBACK_1(GlobalMenuBarX11, void, OnItemActivated, DbusmenuMenuitem*, 146 CHROMEG_CALLBACK_1(GlobalMenuBarX11, void, OnItemActivated, DbusmenuMenuitem*,
147 unsigned int); 147 unsigned int);
148 CHROMEG_CALLBACK_1(GlobalMenuBarX11, void, OnHistoryItemActivated, 148 CHROMEG_CALLBACK_1(GlobalMenuBarX11, void, OnHistoryItemActivated,
149 DbusmenuMenuitem*, unsigned int); 149 DbusmenuMenuitem*, unsigned int);
150 CHROMEG_CALLBACK_0(GlobalMenuBarX11, void, OnHistoryMenuAboutToShow, 150 CHROMEG_CALLBACK_0(GlobalMenuBarX11, void, OnHistoryMenuAboutToShow,
151 DbusmenuMenuitem*); 151 DbusmenuMenuitem*);
152 CHROMEG_CALLBACK_1(GlobalMenuBarX11, void, OnProfileItemActivated, 152 CHROMEG_CALLBACK_1(GlobalMenuBarX11, void, OnProfileItemActivated,
153 DbusmenuMenuitem*, unsigned int); 153 DbusmenuMenuitem*, unsigned int);
154 CHROMEG_CALLBACK_1(GlobalMenuBarX11, void, OnEditProfileItemActivated, 154 CHROMEG_CALLBACK_1(GlobalMenuBarX11, void, OnEditProfileItemActivated,
(...skipping 26 matching lines...) Expand all
181 181
182 content::NotificationRegistrar registrar_; 182 content::NotificationRegistrar registrar_;
183 183
184 // For callbacks may be run after destruction. 184 // For callbacks may be run after destruction.
185 base::WeakPtrFactory<GlobalMenuBarX11> weak_ptr_factory_; 185 base::WeakPtrFactory<GlobalMenuBarX11> weak_ptr_factory_;
186 186
187 DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarX11); 187 DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarX11);
188 }; 188 };
189 189
190 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_X11_H_ 190 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698