OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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_CHROMEOS_WEBUI_WRENCH_MENU_UI_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_WEBUI_WRENCH_MENU_UI_H_ | |
7 #pragma once | |
8 | |
9 #include "chrome/browser/chromeos/webui/menu_ui.h" | |
10 #include "content/common/notification_observer.h" | |
11 #include "content/common/notification_registrar.h" | |
12 #include "content/common/notification_type.h" | |
13 | |
14 class NotificationSource; | |
15 class NotificationDetails; | |
16 | |
17 namespace ui { | |
18 class MenuModel; | |
19 } // namespace ui | |
20 | |
21 namespace views { | |
22 class Menu2; | |
23 } // namespace views | |
24 | |
25 namespace chromeos { | |
26 | |
27 class WrenchMenuUI : public MenuUI, | |
28 public NotificationObserver { | |
29 public: | |
30 explicit WrenchMenuUI(TabContents* contents); | |
31 | |
32 // MenuUI overrides: | |
33 virtual void ModelUpdated(const ui::MenuModel* new_model); | |
34 | |
35 // NotificationObserver: | |
36 virtual void Observe(NotificationType type, | |
37 const NotificationSource& source, | |
38 const NotificationDetails& details); | |
39 | |
40 // Updates zoom controls to reflect the current zooming state. | |
41 void UpdateZoomControls(); | |
42 | |
43 // A convenient factory method to create Menu2 for wrench menu. | |
44 static views::Menu2* CreateMenu2(ui::MenuModel* model); | |
45 | |
46 private: | |
47 NotificationRegistrar registrar_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(WrenchMenuUI); | |
50 }; | |
51 | |
52 } // namespace chromeos | |
53 | |
54 #endif // CHROME_BROWSER_CHROMEOS_WEBUI_WRENCH_MENU_UI_H_ | |
OLD | NEW |