| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "chrome/common/page_transition_types.h" | 9 #include "chrome/common/page_transition_types.h" |
| 10 #include "webkit/glue/context_menu.h" | 10 #include "webkit/glue/context_menu.h" |
| 11 #include "webkit/glue/window_open_disposition.h" | 11 #include "webkit/glue/window_open_disposition.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 class TabContents; | 14 class TabContents; |
| 15 | 15 |
| 16 class RenderViewContextMenu { | 16 class RenderViewContextMenu { |
| 17 public: | 17 public: |
| 18 RenderViewContextMenu( | 18 RenderViewContextMenu( |
| 19 TabContents* tab_contents, | 19 TabContents* tab_contents, |
| 20 const ContextMenuParams& params); | 20 const ContextMenuParams& params); |
| 21 | 21 |
| 22 virtual ~RenderViewContextMenu(); | 22 virtual ~RenderViewContextMenu(); |
| 23 | 23 |
| 24 // Initializes the context menu. | 24 // Initializes the context menu. |
| 25 void Init(); | 25 void Init(); |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 void InitMenu(ContextNode node, ContextMenuMediaParams media_params); | 28 void InitMenu(ContextNodeType node, ContextMenuMediaParams media_params); |
| 29 | 29 |
| 30 // Functions to be implemented by platform-specific subclasses --------------- | 30 // Functions to be implemented by platform-specific subclasses --------------- |
| 31 | 31 |
| 32 // Platform specific initialization goes here. | 32 // Platform specific initialization goes here. |
| 33 virtual void DoInit() {} | 33 virtual void DoInit() {} |
| 34 | 34 |
| 35 // Append a normal menu item, taking the name from the id. | 35 // Append a normal menu item, taking the name from the id. |
| 36 virtual void AppendMenuItem(int id) = 0; | 36 virtual void AppendMenuItem(int id) = 0; |
| 37 | 37 |
| 38 // Append a normal menu item, using |label| for the name. | 38 // Append a normal menu item, using |label| for the name. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Copy to the clipboard an image located at a point in the RenderView | 94 // Copy to the clipboard an image located at a point in the RenderView |
| 95 void CopyImageAt(int x, int y); | 95 void CopyImageAt(int x, int y); |
| 96 | 96 |
| 97 // Launch the inspector targeting a point in the RenderView | 97 // Launch the inspector targeting a point in the RenderView |
| 98 void Inspect(int x, int y); | 98 void Inspect(int x, int y); |
| 99 | 99 |
| 100 // Writes the specified text/url to the system clipboard | 100 // Writes the specified text/url to the system clipboard |
| 101 void WriteTextToClipboard(const string16& text); | 101 void WriteTextToClipboard(const string16& text); |
| 102 void WriteURLToClipboard(const GURL& url); | 102 void WriteURLToClipboard(const GURL& url); |
| 103 | 103 |
| 104 void MediaPlayerActionAt(int x, int y, const MediaPlayerAction& action); |
| 105 |
| 104 bool IsDevCommandEnabled(int id) const; | 106 bool IsDevCommandEnabled(int id) const; |
| 105 | 107 |
| 106 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 108 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
| 107 }; | 109 }; |
| 108 | 110 |
| 109 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 111 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
| OLD | NEW |