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/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 Profile; | 26 class Profile; |
27 class RenderViewHost; | 27 class RenderViewHost; |
28 class TabContents; | 28 class TabContents; |
29 class SpellingMenuObserver; | 29 class SpellingMenuObserver; |
30 | 30 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 ui::SimpleMenuModel* menu_model, | 208 ui::SimpleMenuModel* menu_model, |
209 int *index); | 209 int *index); |
210 // This will set the icon on the most recently-added item in the menu_model_. | 210 // This will set the icon on the most recently-added item in the menu_model_. |
211 void SetExtensionIcon(const std::string& extension_id); | 211 void SetExtensionIcon(const std::string& extension_id); |
212 | 212 |
213 // Opens the specified URL string in a new tab. The |frame_id| specifies the | 213 // Opens the specified URL string in a new tab. The |frame_id| specifies the |
214 // frame in which the context menu was displayed, or 0 if the menu action is | 214 // frame in which the context menu was displayed, or 0 if the menu action is |
215 // independent of that frame (e.g. protocol handler settings). | 215 // independent of that frame (e.g. protocol handler settings). |
216 void OpenURL(const GURL& url, const GURL& referrer, int64 frame_id, | 216 void OpenURL(const GURL& url, const GURL& referrer, int64 frame_id, |
217 WindowOpenDisposition disposition, | 217 WindowOpenDisposition disposition, |
218 PageTransition::Type transition); | 218 content::PageTransition transition); |
219 | 219 |
220 // Copy to the clipboard an image located at a point in the RenderView | 220 // Copy to the clipboard an image located at a point in the RenderView |
221 void CopyImageAt(int x, int y); | 221 void CopyImageAt(int x, int y); |
222 | 222 |
223 // Launch the inspector targeting a point in the RenderView | 223 // Launch the inspector targeting a point in the RenderView |
224 void Inspect(int x, int y); | 224 void Inspect(int x, int y); |
225 | 225 |
226 // Writes the specified text/url to the system clipboard | 226 // Writes the specified text/url to the system clipboard |
227 void WriteURLToClipboard(const GURL& url); | 227 void WriteURLToClipboard(const GURL& url); |
228 | 228 |
(...skipping 24 matching lines...) Expand all Loading... |
253 // An observer that handles a spelling-menu items. | 253 // An observer that handles a spelling-menu items. |
254 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; | 254 scoped_ptr<SpellingMenuObserver> spelling_menu_observer_; |
255 | 255 |
256 // Our observers. | 256 // Our observers. |
257 mutable ObserverList<RenderViewContextMenuObserver> observers_; | 257 mutable ObserverList<RenderViewContextMenuObserver> observers_; |
258 | 258 |
259 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 259 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
260 }; | 260 }; |
261 | 261 |
262 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 262 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |