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

Side by Side Diff: content/public/browser/render_view_host.h

Issue 130773004: Start moving context menu code to RenderFrame. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 28 matching lines...) Expand all
39 struct WebPluginAction; 39 struct WebPluginAction;
40 } 40 }
41 41
42 namespace content { 42 namespace content {
43 43
44 class ChildProcessSecurityPolicy; 44 class ChildProcessSecurityPolicy;
45 class RenderFrameHost; 45 class RenderFrameHost;
46 class RenderViewHostDelegate; 46 class RenderViewHostDelegate;
47 class SessionStorageNamespace; 47 class SessionStorageNamespace;
48 class SiteInstance; 48 class SiteInstance;
49 struct CustomContextMenuContext;
50 struct DropData; 49 struct DropData;
51 50
52 // A RenderViewHost is responsible for creating and talking to a RenderView 51 // A RenderViewHost is responsible for creating and talking to a RenderView
53 // object in a child process. It exposes a high level API to users, for things 52 // object in a child process. It exposes a high level API to users, for things
54 // like loading pages, adjusting the display and other browser functionality, 53 // like loading pages, adjusting the display and other browser functionality,
55 // which it translates into IPC messages sent over the IPC channel with the 54 // which it translates into IPC messages sent over the IPC channel with the
56 // RenderView. It responds to all IPC messages sent by that RenderView and 55 // RenderView. It responds to all IPC messages sent by that RenderView and
57 // cracks them, calling a delegate object back with higher level types where 56 // cracks them, calling a delegate object back with higher level types where
58 // possible. 57 // possible.
59 // 58 //
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // for the new size. 145 // for the new size.
147 virtual void EnableAutoResize(const gfx::Size& min_size, 146 virtual void EnableAutoResize(const gfx::Size& min_size,
148 const gfx::Size& max_size) = 0; 147 const gfx::Size& max_size) = 0;
149 148
150 // Turns off auto-resize and gives a new size that the view should be. 149 // Turns off auto-resize and gives a new size that the view should be.
151 virtual void DisableAutoResize(const gfx::Size& new_size) = 0; 150 virtual void DisableAutoResize(const gfx::Size& new_size) = 0;
152 151
153 // Instructs the RenderView to send back updates to the preferred size. 152 // Instructs the RenderView to send back updates to the preferred size.
154 virtual void EnablePreferredSizeMode() = 0; 153 virtual void EnablePreferredSizeMode() = 0;
155 154
156 // Executes custom context menu action that was provided from WebKit.
157 virtual void ExecuteCustomContextMenuCommand(
158 int action, const CustomContextMenuContext& context) = 0;
159
160 // Tells the renderer to perform the given action on the media player 155 // Tells the renderer to perform the given action on the media player
161 // located at the given point. 156 // located at the given point.
162 virtual void ExecuteMediaPlayerActionAtLocation( 157 virtual void ExecuteMediaPlayerActionAtLocation(
163 const gfx::Point& location, 158 const gfx::Point& location,
164 const blink::WebMediaPlayerAction& action) = 0; 159 const blink::WebMediaPlayerAction& action) = 0;
165 160
166 // Runs some javascript within the context of a frame in the page. 161 // Runs some javascript within the context of a frame in the page.
167 virtual void ExecuteJavascriptInWebFrame(const base::string16& frame_xpath, 162 virtual void ExecuteJavascriptInWebFrame(const base::string16& frame_xpath,
168 const base::string16& jscript) = 0; 163 const base::string16& jscript) = 0;
169 164
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 204
210 // Requests the renderer to evaluate an xpath to a frame and insert css 205 // Requests the renderer to evaluate an xpath to a frame and insert css
211 // into that frame's document. 206 // into that frame's document.
212 virtual void InsertCSS(const base::string16& frame_xpath, 207 virtual void InsertCSS(const base::string16& frame_xpath,
213 const std::string& css) = 0; 208 const std::string& css) = 0;
214 209
215 // Returns true if the RenderView is active and has not crashed. Virtual 210 // Returns true if the RenderView is active and has not crashed. Virtual
216 // because it is overridden by TestRenderViewHost. 211 // because it is overridden by TestRenderViewHost.
217 virtual bool IsRenderViewLive() const = 0; 212 virtual bool IsRenderViewLive() const = 0;
218 213
219 // Let the renderer know that the menu has been closed.
220 virtual void NotifyContextMenuClosed(
221 const CustomContextMenuContext& context) = 0;
222
223 // Notification that a move or resize renderer's containing window has 214 // Notification that a move or resize renderer's containing window has
224 // started. 215 // started.
225 virtual void NotifyMoveOrResizeStarted() = 0; 216 virtual void NotifyMoveOrResizeStarted() = 0;
226 217
227 // Reloads the current focused frame. 218 // Reloads the current focused frame.
228 virtual void ReloadFrame() = 0; 219 virtual void ReloadFrame() = 0;
229 220
230 // Sets a property with the given name and value on the Web UI binding object. 221 // Sets a property with the given name and value on the Web UI binding object.
231 // Must call AllowWebUIBindings() on this renderer first. 222 // Must call AllowWebUIBindings() on this renderer first.
232 virtual void SetWebUIProperty(const std::string& name, 223 virtual void SetWebUIProperty(const std::string& name,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 265
275 private: 266 private:
276 // This interface should only be implemented inside content. 267 // This interface should only be implemented inside content.
277 friend class RenderViewHostImpl; 268 friend class RenderViewHostImpl;
278 RenderViewHost() {} 269 RenderViewHost() {}
279 }; 270 };
280 271
281 } // namespace content 272 } // namespace content
282 273
283 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ 274 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698