OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_ |
7 | 7 |
8 #include "chrome/common/pref_member.h" | 8 #include "chrome/common/pref_member.h" |
| 9 #include "chrome/common/page_transition_types.h" |
9 #include "chrome/views/menu.h" | 10 #include "chrome/views/menu.h" |
10 #include "chrome/common/render_messages.h" | 11 #include "webkit/glue/context_menu.h" |
| 12 #include "webkit/glue/window_open_disposition.h" |
11 | 13 |
12 class WebContents; | 14 class WebContents; |
13 | 15 |
14 class RenderViewContextMenuController : public Menu::Delegate { | 16 class RenderViewContextMenuController : public Menu::Delegate { |
15 public: | 17 public: |
16 RenderViewContextMenuController(WebContents* source_web_contents, | 18 RenderViewContextMenuController(WebContents* source_web_contents, |
17 const ViewHostMsg_ContextMenu_Params& params); | 19 const ContextMenuParams& params); |
18 virtual ~RenderViewContextMenuController(); | 20 virtual ~RenderViewContextMenuController(); |
19 | 21 |
20 // Overridden from Menu::Delegate | 22 // Overridden from Menu::Delegate |
21 virtual std::wstring GetLabel(int id) const; | 23 virtual std::wstring GetLabel(int id) const; |
22 virtual bool IsCommandEnabled(int id) const; | 24 virtual bool IsCommandEnabled(int id) const; |
23 virtual bool IsItemChecked(int id) const; | 25 virtual bool IsItemChecked(int id) const; |
24 virtual void ExecuteCommand(int id); | 26 virtual void ExecuteCommand(int id); |
25 virtual bool GetAcceleratorInfo(int id, views::Accelerator* accel); | 27 virtual bool GetAcceleratorInfo(int id, views::Accelerator* accel); |
26 | 28 |
27 private: | 29 private: |
(...skipping 12 matching lines...) Expand all Loading... |
40 // Writes the specified text/url to the system clipboard | 42 // Writes the specified text/url to the system clipboard |
41 void WriteTextToClipboard(const std::wstring& text); | 43 void WriteTextToClipboard(const std::wstring& text); |
42 void WriteURLToClipboard(const GURL& url); | 44 void WriteURLToClipboard(const GURL& url); |
43 | 45 |
44 bool IsDevCommandEnabled(int id) const; | 46 bool IsDevCommandEnabled(int id) const; |
45 | 47 |
46 DISALLOW_EVIL_CONSTRUCTORS(RenderViewContextMenuController); | 48 DISALLOW_EVIL_CONSTRUCTORS(RenderViewContextMenuController); |
47 | 49 |
48 private: | 50 private: |
49 WebContents* source_web_contents_; | 51 WebContents* source_web_contents_; |
50 ViewHostMsg_ContextMenu_Params params_; | 52 ContextMenuParams params_; |
51 StringPrefMember dictionary_language_; | 53 StringPrefMember dictionary_language_; |
52 int current_dictionary_language_index_; | 54 int current_dictionary_language_index_; |
53 }; | 55 }; |
54 | 56 |
55 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_ | 57 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_CONTEXT_MENU_CONTROLLER_H_ |
56 | 58 |
OLD | NEW |