| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WRENCH_MENU_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 public content::NotificationObserver { | 31 public content::NotificationObserver { |
| 32 public: | 32 public: |
| 33 explicit WrenchMenu(Browser* browser); | 33 explicit WrenchMenu(Browser* browser); |
| 34 virtual ~WrenchMenu(); | 34 virtual ~WrenchMenu(); |
| 35 | 35 |
| 36 void Init(ui::MenuModel* model); | 36 void Init(ui::MenuModel* model); |
| 37 | 37 |
| 38 // Shows the menu relative to the specified view. | 38 // Shows the menu relative to the specified view. |
| 39 void RunMenu(views::MenuButton* host); | 39 void RunMenu(views::MenuButton* host); |
| 40 | 40 |
| 41 // Whether the menu is currently visible to the user. |
| 42 bool IsShowing(); |
| 43 |
| 41 // MenuDelegate overrides: | 44 // MenuDelegate overrides: |
| 42 virtual string16 GetTooltipText(int id, const gfx::Point& p) const OVERRIDE; | 45 virtual string16 GetTooltipText(int id, const gfx::Point& p) const OVERRIDE; |
| 43 virtual bool IsTriggerableEvent(views::MenuItemView* menu, | 46 virtual bool IsTriggerableEvent(views::MenuItemView* menu, |
| 44 const ui::Event& e) OVERRIDE; | 47 const ui::Event& e) OVERRIDE; |
| 45 virtual bool GetDropFormats( | 48 virtual bool GetDropFormats( |
| 46 views::MenuItemView* menu, | 49 views::MenuItemView* menu, |
| 47 int* formats, | 50 int* formats, |
| 48 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; | 51 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; |
| 49 virtual bool AreDropTypesRequired(views::MenuItemView* menu) OVERRIDE; | 52 virtual bool AreDropTypesRequired(views::MenuItemView* menu) OVERRIDE; |
| 50 virtual bool CanDrop(views::MenuItemView* menu, | 53 virtual bool CanDrop(views::MenuItemView* menu, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 150 |
| 148 // ID to use for the items representing bookmarks in the bookmark menu. | 151 // ID to use for the items representing bookmarks in the bookmark menu. |
| 149 int first_bookmark_command_id_; | 152 int first_bookmark_command_id_; |
| 150 | 153 |
| 151 content::NotificationRegistrar registrar_; | 154 content::NotificationRegistrar registrar_; |
| 152 | 155 |
| 153 DISALLOW_COPY_AND_ASSIGN(WrenchMenu); | 156 DISALLOW_COPY_AND_ASSIGN(WrenchMenu); |
| 154 }; | 157 }; |
| 155 | 158 |
| 156 #endif // CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_ | 159 #endif // CHROME_BROWSER_UI_VIEWS_WRENCH_MENU_H_ |
| OLD | NEW |