OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "base/string16.h" | 16 #include "base/string16.h" |
17 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 17 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
18 #include "chrome/browser/extensions/extension_menu_manager.h" | 18 #include "chrome/browser/extensions/extension_menu_manager.h" |
19 #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" | 19 #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" |
20 #include "content/public/common/page_transition_types.h" | 20 #include "content/public/common/page_transition_types.h" |
21 #include "ui/base/models/simple_menu_model.h" | 21 #include "ui/base/models/simple_menu_model.h" |
22 #include "webkit/glue/context_menu.h" | 22 #include "webkit/glue/context_menu.h" |
23 #include "webkit/glue/window_open_disposition.h" | 23 #include "webkit/glue/window_open_disposition.h" |
24 | 24 |
25 class ExtensionMenuItem; | 25 class ExtensionMenuItem; |
| 26 class PrintPreviewContextMenuObserver; |
26 class Profile; | 27 class Profile; |
27 class RenderViewHost; | 28 class RenderViewHost; |
28 class TabContents; | 29 class TabContents; |
29 class SpellingMenuObserver; | 30 class SpellingMenuObserver; |
30 class SpellCheckerSubMenuObserver; | 31 class SpellCheckerSubMenuObserver; |
31 | 32 |
32 namespace gfx { | 33 namespace gfx { |
33 class Point; | 34 class Point; |
34 } | 35 } |
35 | 36 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 ui::SimpleMenuModel protocol_handler_submenu_model_; | 262 ui::SimpleMenuModel protocol_handler_submenu_model_; |
262 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; | 263 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; |
263 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; | 264 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; |
264 | 265 |
265 // An observer that handles spelling-menu items. | 266 // An observer that handles spelling-menu items. |
266 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; | 267 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; |
267 | 268 |
268 // An observer that handles a 'spell-checker options' submenu. | 269 // An observer that handles a 'spell-checker options' submenu. |
269 scoped_ptr<SpellCheckerSubMenuObserver> spellchecker_submenu_observer_; | 270 scoped_ptr<SpellCheckerSubMenuObserver> spellchecker_submenu_observer_; |
270 | 271 |
| 272 // An observer that disables menu items when print preview is active. |
| 273 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
| 274 |
271 // Our observers. | 275 // Our observers. |
272 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 276 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
273 | 277 |
274 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 278 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
275 }; | 279 }; |
276 | 280 |
277 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 281 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |