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_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // // text. | 96 // // text. |
97 // menu_model_.AddItemWithStringId(IDC_MY_ITEM, IDC_MY_TEXT); | 97 // menu_model_.AddItemWithStringId(IDC_MY_ITEM, IDC_MY_TEXT); |
98 // | 98 // |
99 // // Start a task that creates the final text. | 99 // // Start a task that creates the final text. |
100 // my_task_ = new MyTask(this, IDC_MY_ITEM); | 100 // my_task_ = new MyTask(this, IDC_MY_ITEM); |
101 // my_task_->Start(...); | 101 // my_task_->Start(...); |
102 // } | 102 // } |
103 // | 103 // |
104 class RenderViewContextMenuProxy { | 104 class RenderViewContextMenuProxy { |
105 public: | 105 public: |
106 virtual ~RenderViewContextMenuProxy() { } | |
107 | |
108 // Add a menu item to a context menu. | 106 // Add a menu item to a context menu. |
109 virtual void AddMenuItem(int command_id, const string16& title) = 0; | 107 virtual void AddMenuItem(int command_id, const string16& title) = 0; |
110 virtual void AddCheckItem(int command_id, const string16& title) = 0; | 108 virtual void AddCheckItem(int command_id, const string16& title) = 0; |
111 virtual void AddSeparator() = 0; | 109 virtual void AddSeparator() = 0; |
112 | 110 |
113 // Add a submenu item to a context menu. | 111 // Add a submenu item to a context menu. |
114 virtual void AddSubMenu(int command_id, | 112 virtual void AddSubMenu(int command_id, |
115 const string16& label, | 113 const string16& label, |
116 ui::MenuModel* model) = 0; | 114 ui::MenuModel* model) = 0; |
117 | 115 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 // An observer that disables menu items when print preview is active. | 276 // An observer that disables menu items when print preview is active. |
279 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; | 277 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
280 | 278 |
281 // Our observers. | 279 // Our observers. |
282 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 280 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
283 | 281 |
284 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 282 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
285 }; | 283 }; |
286 | 284 |
287 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 285 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |