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

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

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix build (Referrer is a struct, not a class) Created 8 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
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 #pragma once 7 #pragma once
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 namespace WebKit { 28 namespace WebKit {
29 struct WebFindOptions; 29 struct WebFindOptions;
30 struct WebMediaPlayerAction; 30 struct WebMediaPlayerAction;
31 struct WebPluginAction; 31 struct WebPluginAction;
32 } 32 }
33 33
34 namespace content { 34 namespace content {
35 35
36 class ChildProcessSecurityPolicy;
36 class RenderViewHostDelegate; 37 class RenderViewHostDelegate;
37 class SessionStorageNamespace; 38 class SessionStorageNamespace;
38 class SiteInstance; 39 class SiteInstance;
39 struct CustomContextMenuContext; 40 struct CustomContextMenuContext;
40 struct SelectedFileInfo; 41 struct SelectedFileInfo;
41 42
42 // A RenderViewHost is responsible for creating and talking to a RenderView 43 // A RenderViewHost is responsible for creating and talking to a RenderView
43 // object in a child process. It exposes a high level API to users, for things 44 // object in a child process. It exposes a high level API to users, for things
44 // like loading pages, adjusting the display and other browser functionality, 45 // like loading pages, adjusting the display and other browser functionality,
45 // which it translates into IPC messages sent over the IPC channel with the 46 // which it translates into IPC messages sent over the IPC channel with the
46 // RenderView. It responds to all IPC messages sent by that RenderView and 47 // RenderView. It responds to all IPC messages sent by that RenderView and
47 // cracks them, calling a delegate object back with higher level types where 48 // cracks them, calling a delegate object back with higher level types where
48 // possible. 49 // possible.
49 // 50 //
50 // The intent of this interface is to provide a view-agnostic communication 51 // The intent of this interface is to provide a view-agnostic communication
51 // conduit with a renderer. This is so we can build HTML views not only as 52 // conduit with a renderer. This is so we can build HTML views not only as
52 // WebContents (see WebContents for an example) but also as views, etc. 53 // WebContents (see WebContents for an example) but also as views, etc.
53 class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { 54 class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost {
54 public: 55 public:
55 // Returns the RenderViewHost given its ID and the ID of its render process. 56 // Returns the RenderViewHost given its ID and the ID of its render process.
56 // Returns NULL if the IDs do not correspond to a live RenderViewHost. 57 // Returns NULL if the IDs do not correspond to a live RenderViewHost.
57 static RenderViewHost* FromID(int render_process_id, int render_view_id); 58 static RenderViewHost* FromID(int render_process_id, int render_view_id);
58 59
59 // Downcasts from a RenderWidgetHost to a RenderViewHost. Required 60 // Downcasts from a RenderWidgetHost to a RenderViewHost. Required
60 // because RenderWidgetHost is a virtual base class. 61 // because RenderWidgetHost is a virtual base class.
61 static RenderViewHost* From(RenderWidgetHost* rwh); 62 static RenderViewHost* From(RenderWidgetHost* rwh);
62 63
64 // Checks that the given renderer can request |url|, if not it sets it to
65 // about:blank.
66 // |empty_allowed| must be set to false for navigations for security reasons.
67 static void FilterURL(int renderer_id,
68 bool empty_allowed,
69 GURL* url);
70
63 virtual ~RenderViewHost() {} 71 virtual ~RenderViewHost() {}
64 72
65 // Tell the render view to enable a set of javascript bindings. The argument 73 // Tell the render view to enable a set of javascript bindings. The argument
66 // should be a combination of values from BindingsPolicy. 74 // should be a combination of values from BindingsPolicy.
67 virtual void AllowBindings(int binding_flags) = 0; 75 virtual void AllowBindings(int binding_flags) = 0;
68 76
69 // Tells the renderer to clear the focused node (if any). 77 // Tells the renderer to clear the focused node (if any).
70 virtual void ClearFocusedNode() = 0; 78 virtual void ClearFocusedNode() = 0;
71 79
72 // Causes the renderer to close the current page, including running its 80 // Causes the renderer to close the current page, including running its
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 virtual webkit_glue::WebPreferences GetWebkitPreferences() = 0; 263 virtual webkit_glue::WebPreferences GetWebkitPreferences() = 0;
256 264
257 // Passes a list of Webkit preferences to the renderer. 265 // Passes a list of Webkit preferences to the renderer.
258 virtual void UpdateWebkitPreferences( 266 virtual void UpdateWebkitPreferences(
259 const webkit_glue::WebPreferences& prefs) = 0; 267 const webkit_glue::WebPreferences& prefs) = 0;
260 }; 268 };
261 269
262 } // namespace content 270 } // namespace content
263 271
264 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ 272 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/resource_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698