Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(779)

Side by Side Diff: chrome/browser/tab_contents/render_view_context_menu.h

Issue 6893046: added CTRL+Click and SHIFT+Click handler for context menu, Back and Forward. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: reflected comments. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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>
(...skipping 29 matching lines...) Expand all
40 40
41 virtual ~RenderViewContextMenu(); 41 virtual ~RenderViewContextMenu();
42 42
43 // Initializes the context menu. 43 // Initializes the context menu.
44 void Init(); 44 void Init();
45 45
46 // SimpleMenuModel::Delegate implementation. 46 // SimpleMenuModel::Delegate implementation.
47 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 47 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
48 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 48 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
49 virtual void ExecuteCommand(int command_id) OVERRIDE; 49 virtual void ExecuteCommand(int command_id) OVERRIDE;
50 virtual void ExecuteCommandWithFlags(int command_id, int flags) OVERRIDE;
50 virtual void MenuWillShow() OVERRIDE; 51 virtual void MenuWillShow() OVERRIDE;
51 virtual void MenuClosed() OVERRIDE; 52 virtual void MenuClosed() OVERRIDE;
52 53
53 protected: 54 protected:
54 void InitMenu(); 55 void InitMenu();
55 56
56 // Platform specific functions. 57 // Platform specific functions.
57 virtual void PlatformInit() = 0; 58 virtual void PlatformInit() = 0;
58 virtual bool GetAcceleratorForCommandId( 59 virtual bool GetAcceleratorForCommandId(
59 int command_id, 60 int command_id,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 int *index); 123 int *index);
123 // This will set the icon on the most recently-added item in the menu_model_. 124 // This will set the icon on the most recently-added item in the menu_model_.
124 void SetExtensionIcon(const std::string& extension_id); 125 void SetExtensionIcon(const std::string& extension_id);
125 126
126 // Opens the specified URL string in a new tab. If |in_current_window| is 127 // Opens the specified URL string in a new tab. If |in_current_window| is
127 // false, a new window is created to hold the new tab. 128 // false, a new window is created to hold the new tab.
128 void OpenURL(const GURL& url, const GURL& referrer, 129 void OpenURL(const GURL& url, const GURL& referrer,
129 WindowOpenDisposition disposition, 130 WindowOpenDisposition disposition,
130 PageTransition::Type transition); 131 PageTransition::Type transition);
131 132
133 // Open a previous page. |event_flags| is a bitsum of ui::EventFlags.
134 void GoBack(int event_flags);
135
136 // Open a forward page. |event_flags| is a bitsum of ui::EventFlags.
137 void GoForward(int event_flags);
138
132 // Copy to the clipboard an image located at a point in the RenderView 139 // Copy to the clipboard an image located at a point in the RenderView
133 void CopyImageAt(int x, int y); 140 void CopyImageAt(int x, int y);
134 141
135 // Launch the inspector targeting a point in the RenderView 142 // Launch the inspector targeting a point in the RenderView
136 void Inspect(int x, int y); 143 void Inspect(int x, int y);
137 144
138 // Writes the specified text/url to the system clipboard 145 // Writes the specified text/url to the system clipboard
139 void WriteURLToClipboard(const GURL& url); 146 void WriteURLToClipboard(const GURL& url);
140 147
141 void MediaPlayerActionAt(const gfx::Point& location, 148 void MediaPlayerActionAt(const gfx::Point& location,
(...skipping 10 matching lines...) Expand all
152 GURL selection_navigation_url_; 159 GURL selection_navigation_url_;
153 160
154 ui::SimpleMenuModel spellcheck_submenu_model_; 161 ui::SimpleMenuModel spellcheck_submenu_model_;
155 ui::SimpleMenuModel bidi_submenu_model_; 162 ui::SimpleMenuModel bidi_submenu_model_;
156 ScopedVector<ui::SimpleMenuModel> extension_menu_models_; 163 ScopedVector<ui::SimpleMenuModel> extension_menu_models_;
157 164
158 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); 165 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
159 }; 166 };
160 167
161 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ 168 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698