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

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

Issue 1410313006: Separate RenderViewHost from RenderWidgetHost, part 5: move calls to the RenderWidgetHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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_widget_host_delegate.h
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
index aa9b4ff39a7a96a749dc4e5b172515446ec3d71e..635fc42c8b862aab5f26d34acd79229fdb832906 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -18,6 +18,8 @@ class WebGestureEvent;
namespace gfx {
class Point;
+class Rect;
+class Size;
}
namespace content {
@@ -44,6 +46,10 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
virtual void RenderWidgetWasResized(RenderWidgetHostImpl* render_widget_host,
bool width_changed) {}
+ // The contents auto-resized and the container should match it.
+ virtual void ResizeDueToAutoResize(RenderWidgetHostImpl* render_widget_host,
+ const gfx::Size& new_size) {}
+
// The screen info has changed.
virtual void ScreenInfoChanged() {}
@@ -76,6 +82,11 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
// Returns true if the |event| was handled.
virtual bool PreHandleGestureEvent(const blink::WebGestureEvent& event);
+ // Notification the user has made a gesture while focus was on the
+ // page. This is used to avoid uninitiated user downloads (aka carpet
+ // bombing), see DownloadRequestLimiter for details.
+ virtual void OnUserGesture(RenderWidgetHostImpl* render_widget_host) {}
+
// Notifies that screen rects were sent to renderer process.
virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) {}
@@ -112,6 +123,27 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
// should consume a keyboard input event.
virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost();
+ // Notification that the renderer has become unresponsive. The
+ // delegate can use this notification to show a warning to the user.
+ virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) {}
+
+ // Notification that a previously unresponsive renderer has become
+ // responsive again. The delegate can use this notification to end the
+ // warning shown to the user.
+ virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {}
+
+ // Requests to lock the mouse. Once the request is approved or rejected,
+ // GotResponseToLockMouseRequest() will be called on the requesting render
+ // widget host.
+ virtual void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host,
+ bool user_gesture,
+ bool last_unlocked_by_target) {}
+
+ // Return the rect where to display the resize corner, if any, otherwise
+ // an empty rect.
+ virtual gfx::Rect GetRootWindowResizerRect(
+ RenderWidgetHostImpl* render_widget_host) const;
+
#if defined(OS_WIN)
virtual gfx::NativeViewAccessible GetParentNativeViewAccessible();
#endif
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698