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

Unified Diff: content/browser/renderer_host/render_view_host.h

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host.h
diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h
index 838bc79c296e7c19a9a09c8e130242b3ef424c1c..e488b398e45b4dc294fca8bcf7b3b33c6510286f 100644
--- a/content/browser/renderer_host/render_view_host.h
+++ b/content/browser/renderer_host/render_view_host.h
@@ -101,8 +101,220 @@ class ExecuteNotificationObserver : public content::NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(ExecuteNotificationObserver);
};
+// TODO(joi): Put relevant bits of RWH documentation here.
+// TODO(joi): Move to content namespace.
+// TODO(joi): Move to separate file under content/public/browser.
+class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost {
+ public:
+ // Returns the RenderViewHost given its ID and the ID of its render process.
+ // Returns NULL if the IDs do not correspond to a live RenderViewHost.
+ static RenderViewHost* FromID(int render_process_id, int render_view_id);
+
+ virtual ~RenderViewHost() {}
+
+ // Tell the render view to enable a set of javascript bindings. The argument
+ // should be a combination of values from BindingsPolicy.
+ virtual void AllowBindings(int binding_flags) = 0;
+
+ // Tells the renderer to clear the focused node (if any).
+ virtual void ClearFocusedNode() = 0;
+
+ // Causes the renderer to close the current page, including running its
+ // onunload event handler. A ClosePage_ACK message will be sent to the
+ // ResourceDispatcherHost when it is finished.
+ virtual void ClosePage() = 0;
+
+ // Copies the image at location x, y to the clipboard (if there indeed is an
+ // image at that location).
+ virtual void CopyImageAt(int x, int y) = 0;
+
+ // Sent to the renderer when a popup window should no longer count against
+ // the current popup count (either because it's not a popup or because it was
+ // a generated by a user action).
+ virtual void DisassociateFromPopupCount() = 0;
+
+ // Notifies the renderer about the result of a desktop notification.
+ virtual void DesktopNotificationPermissionRequestDone(
+ int callback_context) = 0;
+ virtual void DesktopNotificationPostDisplay(int callback_context) = 0;
+ virtual void DesktopNotificationPostError(int notification_id,
+ const string16& message) = 0;
+ virtual void DesktopNotificationPostClose(int notification_id,
+ bool by_user) = 0;
+ virtual void DesktopNotificationPostClick(int notification_id) = 0;
+
+ // Notifies the listener that a directory enumeration is complete.
+ virtual void DirectoryEnumerationFinished(
+ int request_id,
+ const std::vector<FilePath>& files) = 0;
+
+ // Tells the renderer not to add scrollbars with height and width below a
+ // threshold.
+ virtual void DisableScrollbarsForThreshold(const gfx::Size& size) = 0;
+
+ // Notifies the renderer that a a drag operation that it started has ended,
+ // either in a drop or by being cancelled.
+ virtual void DragSourceEndedAt(
+ int client_x, int client_y, int screen_x, int screen_y,
+ WebKit::WebDragOperation operation) = 0;
+
+ // Notifies the renderer that a drag and drop operation is in progress, with
+ // droppable items positioned over the renderer's view.
+ virtual void DragSourceMovedTo(
+ int client_x, int client_y, int screen_x, int screen_y) = 0;
+
+ // Notifies the renderer that we're done with the drag and drop operation.
+ // This allows the renderer to reset some state.
+ virtual void DragSourceSystemDragEnded() = 0;
+
+ // D&d drop target messages that get sent to WebKit.
+ virtual void DragTargetDragEnter(
+ const WebDropData& drop_data,
+ const gfx::Point& client_pt,
+ const gfx::Point& screen_pt,
+ WebKit::WebDragOperationsMask operations_allowed) = 0;
+ virtual void DragTargetDragOver(
+ const gfx::Point& client_pt,
+ const gfx::Point& screen_pt,
+ WebKit::WebDragOperationsMask operations_allowed) = 0;
+ virtual void DragTargetDragLeave() = 0;
+ virtual void DragTargetDrop(const gfx::Point& client_pt,
+ const gfx::Point& screen_pt) = 0;
+
+ // Instructs the RenderView to automatically resize and send back updates
+ // for the new size.
+ virtual void EnableAutoResize(const gfx::Size& min_size,
+ const gfx::Size& max_size) = 0;
+
+ // Turns off auto-resize and gives a new size that the view should be.
+ virtual void DisableAutoResize(const gfx::Size& new_size) = 0;
+
+ // Instructs the RenderView to send back updates to the preferred size.
+ virtual void EnablePreferredSizeMode() = 0;
+
+ // Executes custom context menu action that was provided from WebKit.
+ virtual void ExecuteCustomContextMenuCommand(
+ int action, const content::CustomContextMenuContext& context) = 0;
+
+ // Tells the renderer to perform the given action on the media player
+ // located at the given point.
+ virtual void ExecuteMediaPlayerActionAtLocation(
+ const gfx::Point& location,
+ const WebKit::WebMediaPlayerAction& action) = 0;
+
+ // Runs some javascript within the context of a frame in the page.
+ virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath,
+ const string16& jscript) = 0;
+
+ // Runs some javascript within the context of a frame in the page. The result
+ // is sent back via the notification EXECUTE_JAVASCRIPT_RESULT.
+ virtual int ExecuteJavascriptInWebFrameNotifyResult(
+ const string16& frame_xpath,
+ const string16& jscript) = 0;
+
+ virtual Value* ExecuteJavascriptAndGetValue(const string16& frame_xpath,
+ const string16& jscript) = 0;
+
+ // Tells the renderer to perform the given action on the plugin located at
+ // the given point.
+ virtual void ExecutePluginActionAtLocation(
+ const gfx::Point& location, const WebKit::WebPluginAction& action) = 0;
+
+ // Asks the renderer to exit fullscreen
+ virtual void ExitFullscreen() = 0;
+
+ // Finds text on a page.
+ virtual void Find(int request_id, const string16& search_text,
+ const WebKit::WebFindOptions& options) = 0;
+
+ // Causes the renderer to invoke the onbeforeunload event handler. The
+ // result will be returned via ViewMsg_ShouldClose. See also ClosePage and
+ // SwapOut, which fire the PageUnload event.
+ //
+ // Set bool for_cross_site_transition when this close is just for the current
+ // RenderView in the case of a cross-site transition. False means we're
+ // closing the entire tab.
+ virtual void FirePageBeforeUnload(bool for_cross_site_transition) = 0;
+
+ // Notifies the Listener that one or more files have been chosen by the user
+ // from a file chooser dialog for the form. |permissions| are flags from the
+ // base::PlatformFileFlags enum which specify which file permissions should
+ // be granted to the renderer.
+ virtual void FilesSelectedInChooser(const std::vector<FilePath>& files,
+ int permissions) = 0;
+
+ virtual content::RenderViewHostDelegate* GetDelegate() const = 0;
+
+ // Returns a bitwise OR of bindings types that have been enabled for this
+ // RenderView. See BindingsPolicy for details.
+ virtual int GetEnabledBindings() const = 0;
+
+ virtual content::SessionStorageNamespace* GetSessionStorageNamespace() = 0;
+
+ virtual content::SiteInstance* GetSiteInstance() const = 0;
+
+ // Requests the renderer to evaluate an xpath to a frame and insert css
+ // into that frame's document.
+ virtual void InsertCSS(const string16& frame_xpath,
+ const std::string& css) = 0;
+
+ // Returns true if the RenderView is active and has not crashed. Virtual
+ // because it is overridden by TestRenderViewHost.
+ virtual bool IsRenderViewLive() const = 0;
+
+ // Let the renderer know that the menu has been closed.
+ virtual void NotifyContextMenuClosed(
+ const content::CustomContextMenuContext& context) = 0;
+
+ // Notification that a move or resize renderer's containing window has
+ // started.
+ virtual void NotifyMoveOrResizeStarted() = 0;
+
+ // Reloads the current focused frame.
+ virtual void ReloadFrame() = 0;
+
+ // Sets the alternate error page URL (link doctor) for the renderer process.
+ virtual void SetAltErrorPageURL(const GURL& url) = 0;
+
+ // Sets a property with the given name and value on the Web UI binding object.
+ // Must call AllowWebUIBindings() on this renderer first.
+ virtual void SetWebUIProperty(const std::string& name,
+ const std::string& value) = 0;
+
+ // Set the zoom level for the current main frame
+ virtual void SetZoomLevel(double level) = 0;
+
+ // Notifies the renderer that the user has closed the FindInPage window
+ // (and what action to take regarding the selection).
+ virtual void StopFinding(content::StopFindAction action) = 0;
+
+ // Send the renderer process the current preferences supplied by the
+ // RenderViewHostDelegate.
+ virtual void SyncRendererPrefs() = 0;
+
+ virtual void ToggleSpeechInput() = 0;
+
+ // Passes a list of Webkit preferences to the renderer.
+ virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0;
+
+ // Changes the zoom level for the current main frame.
+ virtual void Zoom(content::PageZoom zoom) = 0;
+};
+
+#if defined(COMPILER_MSVC)
+// RenderViewHostImpl is the bottom of a diamond-shaped hierarchy,
+// with RenderWidgetHost at the root. VS warns when methods from the
+// root are overridden in only one of the base classes and not both
+// (in this case, RenderWidgetHostImpl provides implementations of
+// many of the methods). This is a silly warning when dealing with
+// pure virtual methods that only have a single implementation in the
+// hierarchy above this class, and is safe to ignore in this case.
+#pragma warning(push)
+#pragma warning(disable: 4250)
+#endif
+
//
-// RenderViewHost
+// RenderViewHostImpl
//
// A RenderViewHost is responsible for creating and talking to a RenderView
// object in a child process. It exposes a high level API to users, for things
@@ -127,13 +339,13 @@ class ExecuteNotificationObserver : public content::NotificationObserver {
// will not be able to traverse pages back and forward. We need to determine
// if we want to bring that and other functionality down into this object so
// it can be shared by others.
-//
-// TODO(joi): Hide most of this from chrome.
-class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
+// TODO(joi): Move to content namespace.
+class CONTENT_EXPORT RenderViewHostImpl
+ : public RenderViewHost,
+ public RenderWidgetHostImpl {
public:
- // Returns the RenderViewHost given its ID and the ID of its render process.
- // Returns NULL if the IDs do not correspond to a live RenderViewHost.
- static RenderViewHost* FromID(int render_process_id, int render_view_id);
+ // Convenience function, just like RenderViewHost::FromID.
+ static RenderViewHostImpl* FromID(int render_process_id, int render_view_id);
// routing_id could be a valid route id, or it could be MSG_ROUTING_NONE, in
// which case RenderWidgetHost will create a new one.
@@ -142,14 +354,96 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
// tab contentses to share the same session storage (part of the WebStorage
// spec) space. This is useful when restoring tabs, but most callers should
// pass in NULL which will cause a new SessionStorageNamespace to be created.
- RenderViewHost(content::SiteInstance* instance,
- content::RenderViewHostDelegate* delegate,
- int routing_id,
- content::SessionStorageNamespace* session_storage_namespace);
- virtual ~RenderViewHost();
-
- content::SiteInstance* site_instance() const { return instance_; }
- content::RenderViewHostDelegate* delegate() const { return delegate_; }
+ RenderViewHostImpl(
+ content::SiteInstance* instance,
+ content::RenderViewHostDelegate* delegate,
+ int routing_id,
+ content::SessionStorageNamespace* session_storage_namespace);
+ virtual ~RenderViewHostImpl();
+
+ // RenderViewHost implementation.
+ virtual void AllowBindings(int binding_flags) OVERRIDE;
+ virtual void ClearFocusedNode() OVERRIDE;
+ virtual void ClosePage() OVERRIDE;
+ virtual void CopyImageAt(int x, int y) OVERRIDE;
+ virtual void DisassociateFromPopupCount() OVERRIDE;
+ virtual void DesktopNotificationPermissionRequestDone(
+ int callback_context) OVERRIDE;
+ virtual void DesktopNotificationPostDisplay(int callback_context) OVERRIDE;
+ virtual void DesktopNotificationPostError(int notification_id,
+ const string16& message) OVERRIDE;
+ virtual void DesktopNotificationPostClose(int notification_id,
+ bool by_user) OVERRIDE;
+ virtual void DesktopNotificationPostClick(int notification_id) OVERRIDE;
+ virtual void DirectoryEnumerationFinished(
+ int request_id,
+ const std::vector<FilePath>& files) OVERRIDE;
+ virtual void DisableScrollbarsForThreshold(const gfx::Size& size) OVERRIDE;
+ virtual void DragSourceEndedAt(
+ int client_x, int client_y, int screen_x, int screen_y,
+ WebKit::WebDragOperation operation) OVERRIDE;
+ virtual void DragSourceMovedTo(
+ int client_x, int client_y, int screen_x, int screen_y) OVERRIDE;
+ virtual void DragSourceSystemDragEnded() OVERRIDE;
+ virtual void DragTargetDragEnter(
+ const WebDropData& drop_data,
+ const gfx::Point& client_pt,
+ const gfx::Point& screen_pt,
+ WebKit::WebDragOperationsMask operations_allowed) OVERRIDE;
+ virtual void DragTargetDragOver(
+ const gfx::Point& client_pt,
+ const gfx::Point& screen_pt,
+ WebKit::WebDragOperationsMask operations_allowed) OVERRIDE;
+ virtual void DragTargetDragLeave() OVERRIDE;
+ virtual void DragTargetDrop(const gfx::Point& client_pt,
+ const gfx::Point& screen_pt) OVERRIDE;
+ virtual void EnableAutoResize(const gfx::Size& min_size,
+ const gfx::Size& max_size) OVERRIDE;
+ virtual void DisableAutoResize(const gfx::Size& new_size) OVERRIDE;
+ virtual void EnablePreferredSizeMode() OVERRIDE;
+ virtual void ExecuteCustomContextMenuCommand(
+ int action, const content::CustomContextMenuContext& context) OVERRIDE;
+ virtual void ExecuteMediaPlayerActionAtLocation(
+ const gfx::Point& location,
+ const WebKit::WebMediaPlayerAction& action) OVERRIDE;
+ virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath,
+ const string16& jscript) OVERRIDE;
+ virtual int ExecuteJavascriptInWebFrameNotifyResult(
+ const string16& frame_xpath,
+ const string16& jscript) OVERRIDE;
+ virtual Value* ExecuteJavascriptAndGetValue(const string16& frame_xpath,
+ const string16& jscript) OVERRIDE;
+ virtual void ExecutePluginActionAtLocation(
+ const gfx::Point& location,
+ const WebKit::WebPluginAction& action) OVERRIDE;
+ virtual void ExitFullscreen() OVERRIDE;
+ virtual void Find(int request_id, const string16& search_text,
+ const WebKit::WebFindOptions& options) OVERRIDE;
+ virtual void FirePageBeforeUnload(bool for_cross_site_transition) OVERRIDE;
+ virtual void FilesSelectedInChooser(const std::vector<FilePath>& files,
+ int permissions) OVERRIDE;
+ virtual content::RenderViewHostDelegate* GetDelegate() const OVERRIDE;
+ virtual int GetEnabledBindings() const OVERRIDE;
+ virtual content::SessionStorageNamespace*
+ GetSessionStorageNamespace() OVERRIDE;
+ virtual content::SiteInstance* GetSiteInstance() const OVERRIDE;
+ virtual void InsertCSS(const string16& frame_xpath,
+ const std::string& css) OVERRIDE;
+ virtual bool IsRenderViewLive() const OVERRIDE;
+ virtual void NotifyContextMenuClosed(
+ const content::CustomContextMenuContext& context) OVERRIDE;
+ virtual void NotifyMoveOrResizeStarted() OVERRIDE;
+ virtual void ReloadFrame() OVERRIDE;
+ virtual void SetAltErrorPageURL(const GURL& url) OVERRIDE;
+ virtual void SetWebUIProperty(const std::string& name,
+ const std::string& value) OVERRIDE;
+ virtual void SetZoomLevel(double level) OVERRIDE;
+ virtual void StopFinding(content::StopFindAction action) OVERRIDE;
+ virtual void SyncRendererPrefs() OVERRIDE;
+ virtual void ToggleSpeechInput() OVERRIDE;
+ virtual void UpdateWebkitPreferences(const WebPreferences& prefs) OVERRIDE;
+ virtual void Zoom(content::PageZoom zoom) OVERRIDE;
+
void set_delegate(content::RenderViewHostDelegate* d) {
CHECK(d); // http://crbug.com/82827
delegate_ = d;
@@ -161,18 +455,10 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
// -1, the RenderView is told to start issuing page IDs at |max_page_id| + 1.
virtual bool CreateRenderView(const string16& frame_name, int32 max_page_id);
- // Returns true if the RenderView is active and has not crashed. Virtual
- // because it is overridden by TestRenderViewHost.
- virtual bool IsRenderViewLive() const;
-
base::TerminationStatus render_view_termination_status() const {
return render_view_termination_status_;
}
- // Send the renderer process the current preferences supplied by the
- // RenderViewHostDelegate.
- void SyncRendererPrefs();
-
// Sends the given navigation message. Use this rather than sending it
// yourself since this does the internal bookkeeping described below. This
// function takes ownership of the provided message pointer.
@@ -210,15 +496,6 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
// different process.
bool is_swapped_out() const { return is_swapped_out_; }
- // Causes the renderer to invoke the onbeforeunload event handler. The
- // result will be returned via ViewMsg_ShouldClose. See also ClosePage and
- // SwapOut, which fire the PageUnload event.
- //
- // Set bool for_cross_site_transition when this close is just for the current
- // RenderView in the case of a cross-site transition. False means we're
- // closing the entire tab.
- void FirePageBeforeUnload(bool for_cross_site_transition);
-
// Tells the renderer that this RenderView is being swapped out for one in a
// different renderer process. It should run its unload handler and move to
// a blank document. The renderer should preserve the Frame object until it
@@ -239,11 +516,6 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
// RenderViews.
void WasSwappedOut();
- // Causes the renderer to close the current page, including running its
- // onunload event handler. A ClosePage_ACK message will be sent to the
- // ResourceDispatcherHost when it is finished.
- void ClosePage();
-
// Close the page ignoring whether it has unload events registers.
// This is called after the beforeunload and unload events have fired
// and the user has agreed to continue with closing the page.
@@ -260,72 +532,12 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
// hangs, in which case we need to swap to the pending RenderViewHost.
int GetPendingRequestId();
- // D&d drop target messages that get sent to WebKit.
- void DragTargetDragEnter(const WebDropData& drop_data,
- const gfx::Point& client_pt,
- const gfx::Point& screen_pt,
- WebKit::WebDragOperationsMask operations_allowed);
- void DragTargetDragOver(const gfx::Point& client_pt,
- const gfx::Point& screen_pt,
- WebKit::WebDragOperationsMask operations_allowed);
- void DragTargetDragLeave();
- void DragTargetDrop(const gfx::Point& client_pt,
- const gfx::Point& screen_pt);
-
- // Notifies the renderer about the result of a desktop notification.
- void DesktopNotificationPermissionRequestDone(int callback_context);
- void DesktopNotificationPostDisplay(int callback_context);
- void DesktopNotificationPostError(int notification_id,
- const string16& message);
- void DesktopNotificationPostClose(int notification_id, bool by_user);
- void DesktopNotificationPostClick(int notification_id);
-
- // Runs some javascript within the context of a frame in the page.
- void ExecuteJavascriptInWebFrame(const string16& frame_xpath,
- const string16& jscript);
-
- // Runs some javascript within the context of a frame in the page. The result
- // is sent back via the notification EXECUTE_JAVASCRIPT_RESULT.
- int ExecuteJavascriptInWebFrameNotifyResult(const string16& frame_xpath,
- const string16& jscript);
-
- Value* ExecuteJavascriptAndGetValue(const string16& frame_xpath,
- const string16& jscript);
-
-
// Notifies the RenderView that the JavaScript message that was shown was
// closed by the user.
void JavaScriptDialogClosed(IPC::Message* reply_msg,
bool success,
const string16& user_input);
- // Notifies the renderer that a a drag operation that it started has ended,
- // either in a drop or by being cancelled.
- void DragSourceEndedAt(
- int client_x, int client_y, int screen_x, int screen_y,
- WebKit::WebDragOperation operation);
-
- // Notifies the renderer that a drag and drop operation is in progress, with
- // droppable items positioned over the renderer's view.
- void DragSourceMovedTo(
- int client_x, int client_y, int screen_x, int screen_y);
-
- // Notifies the renderer that we're done with the drag and drop operation.
- // This allows the renderer to reset some state.
- void DragSourceSystemDragEnded();
-
- // Tell the render view to enable a set of javascript bindings. The argument
- // should be a combination of values from BindingsPolicy.
- void AllowBindings(int binding_flags);
-
- // Returns a bitwise OR of bindings types that have been enabled for this
- // RenderView. See BindingsPolicy for details.
- int enabled_bindings() const { return enabled_bindings_; }
-
- // Sets a property with the given name and value on the Web UI binding object.
- // Must call AllowWebUIBindings() on this renderer first.
- void SetWebUIProperty(const std::string& name, const std::string& value);
-
// Tells the renderer view to focus the first (last if reverse is true) node.
void SetInitialFocus(bool reverse);
@@ -341,17 +553,6 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
const std::vector<FilePath>& local_paths,
const FilePath& local_directory_name);
- // Notifies the Listener that one or more files have been chosen by the user
- // from a file chooser dialog for the form. |permissions| are flags from the
- // base::PlatformFileFlags enum which specify which file permissions should
- // be granted to the renderer.
- void FilesSelectedInChooser(const std::vector<FilePath>& files,
- int permissions);
-
- // Notifies the listener that a directory enumeration is complete.
- void DirectoryEnumerationFinished(int request_id,
- const std::vector<FilePath>& files);
-
// Notifies the RenderViewHost that its load state changed.
void LoadStateChanged(const GURL& url,
const net::LoadStateWithParam& load_state,
@@ -394,8 +595,6 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
void DidCancelPopupMenu();
#endif
- void ToggleSpeechInput();
-
void set_save_accessibility_tree_for_testing(bool save) {
save_accessibility_tree_for_testing_ = save;
}
@@ -418,88 +617,6 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
int renderer_id,
GURL* url);
- // Sets the alternate error page URL (link doctor) for the renderer process.
- void SetAltErrorPageURL(const GURL& url);
-
- // Asks the renderer to exit fullscreen
- void ExitFullscreen();
-
- // Passes a list of Webkit preferences to the renderer.
- void UpdateWebkitPreferences(const WebPreferences& prefs);
-
- // Tells the renderer to clear the focused node (if any).
- void ClearFocusedNode();
-
- // Set the zoom level for the current main frame
- void SetZoomLevel(double level);
-
- // Changes the zoom level for the current main frame.
- void Zoom(content::PageZoom zoom);
-
- // Reloads the current focused frame.
- void ReloadFrame();
-
- // Finds text on a page.
- void Find(int request_id, const string16& search_text,
- const WebKit::WebFindOptions& options);
-
- // Requests the renderer to evaluate an xpath to a frame and insert css
- // into that frame's document.
- void InsertCSS(const string16& frame_xpath, const std::string& css);
-
- // Tells the renderer not to add scrollbars with height and width below a
- // threshold.
- void DisableScrollbarsForThreshold(const gfx::Size& size);
-
- // Instructs the RenderView to send back updates to the preferred size.
- void EnablePreferredSizeMode();
-
- // Instructs the RenderView to automatically resize and send back updates
- // for the new size.
- void EnableAutoResize(const gfx::Size& min_size, const gfx::Size& max_size);
-
- // Turns off auto-resize and gives a new size that the view should be.
- void DisableAutoResize(const gfx::Size& new_size);
-
- // Executes custom context menu action that was provided from WebKit.
- void ExecuteCustomContextMenuCommand(
- int action, const content::CustomContextMenuContext& context);
-
- // Let the renderer know that the menu has been closed.
- void NotifyContextMenuClosed(
- const content::CustomContextMenuContext& context);
-
- // Copies the image at location x, y to the clipboard (if there indeed is an
- // image at that location).
- void CopyImageAt(int x, int y);
-
- // Tells the renderer to perform the given action on the media player
- // located at the given point.
- void ExecuteMediaPlayerActionAtLocation(
- const gfx::Point& location, const WebKit::WebMediaPlayerAction& action);
-
- // Tells the renderer to perform the given action on the plugin located at
- // the given point.
- void ExecutePluginActionAtLocation(
- const gfx::Point& location, const WebKit::WebPluginAction& action);
-
- // Sent to the renderer when a popup window should no longer count against
- // the current popup count (either because it's not a popup or because it was
- // a generated by a user action).
- void DisassociateFromPopupCount();
-
- // Notification that a move or resize renderer's containing window has
- // started.
- void NotifyMoveOrResizeStarted();
-
- // Notifies the renderer that the user has closed the FindInPage window
- // (and what action to take regarding the selection).
- void StopFinding(content::StopFindAction action);
-
- content::SessionStorageNamespace* session_storage_namespace() {
- return session_storage_namespace_.get();
- }
-
// NOTE: Do not add functions that just send an IPC message that are called in
// one or two places. Have the caller send the IPC message directly.
@@ -625,14 +742,14 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
void ClearPowerSaveBlockers();
+ // Our delegate, which wants to know about changes in the RenderView.
+ content::RenderViewHostDelegate* delegate_;
+
// The SiteInstance associated with this RenderViewHost. All pages drawn
// in this RenderViewHost are part of this SiteInstance. Should not change
// over time.
scoped_refptr<SiteInstanceImpl> instance_;
- // Our delegate, which wants to know about changes in the RenderView.
- content::RenderViewHostDelegate* delegate_;
-
// true if we are currently waiting for a response for drag context
// information.
bool waiting_for_drag_context_response_;
@@ -714,7 +831,11 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHostImpl {
// A list of observers that filter messages. Weak references.
ObserverList<content::RenderViewHostObserver> observers_;
- DISALLOW_COPY_AND_ASSIGN(RenderViewHost);
+ DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
};
+#if defined(COMPILER_MSVC)
+#pragma warning(pop)
+#endif
+
#endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
« no previous file with comments | « content/browser/renderer_host/pepper_message_filter.cc ('k') | content/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698