Chromium Code Reviews| Index: content/browser/web_contents/web_contents_impl.h |
| diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h |
| index 358b8a6a0fa128ed851d627de3f369fea5733421..f4bb9a4639f3ce1f0276ca080088fd3b0407d9a0 100644 |
| --- a/content/browser/web_contents/web_contents_impl.h |
| +++ b/content/browser/web_contents/web_contents_impl.h |
| @@ -646,6 +646,9 @@ class CONTENT_EXPORT WebContentsImpl |
| void ReplicatePageFocus(bool is_focused) override; |
| RenderWidgetHostImpl* GetFocusedRenderWidgetHost( |
| RenderWidgetHostImpl* receiving_widget) override; |
| + RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus() override; |
| + void FocusOwningWebContents( |
| + RenderWidgetHostImpl* render_widget_host) override; |
| void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, |
| RendererUnresponsiveType type) override; |
| void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override; |
| @@ -1002,12 +1005,36 @@ class CONTENT_EXPORT WebContentsImpl |
| // up at the next animation step if the throbber is going. |
| void SetNotWaitingForResponse() { waiting_for_response_ = false; } |
| + |
| + // Guest View Helpers -------------------------------------------------------- |
|
Charlie Reis
2016/11/17 00:49:48
nit: GuestView isn't a concept within content, so
avallee
2016/11/17 02:37:49
Done.
|
| + // |
| + // These functions are helpers in managing a hierharchy of WebContents |
|
Charlie Reis
2016/11/17 00:49:48
nit: hierarchy
avallee
2016/11/17 02:37:49
Done.
|
| + // involved in rendering Guest Views. |
|
Charlie Reis
2016/11/17 00:49:48
nit: rendering inner WebContents.
avallee
2016/11/17 02:37:49
Done.
|
| + |
| + // When multiple WebContents are present, a single one is focused and will |
|
Charlie Reis
2016/11/17 00:49:48
nit: present within a tab?
avallee
2016/11/17 02:37:49
Done.
|
| + // route keyboard events in most cases to a RenderWidget contained within |
| + // it. |GetFocusedWebContents()|'s main frame widget will receive page focus |
| + // and blur events when the containing window changes focus state. |
| + |
| + |
| // Returns the focused WebContents. |
| // If there are multiple inner/outer WebContents (when embedding <webview>, |
| // <guestview>, ...) returns the single one containing the currently focused |
| // frame. Otherwise, returns this WebContents. |
| WebContentsImpl* GetFocusedWebContents(); |
| + // Returns true if |this| is the focused WebContents or an ancestor of the |
| + // focused WebContents. |
| + bool ContainsOrIsFocusedWebContents(); |
| + |
| + // When inner or outer WebContents are present, become the focused |
| + // WebContentsImpl. This will activate this content's main frame RenderWidget |
| + // and indirectly all its subframe widgets. GetFocusedRenderWidgetHost will |
| + // search this WebContentsImpl for a focused RenderWidgetHost. The previously |
| + // focused WebContentsImpl, if any, will have its RenderWidgetHosts |
| + // deactivated. |
| + void SetAsFocusedWebContentsIfNecessary(); |
| + |
| // Returns the root of the WebContents tree. |
| WebContentsImpl* GetOutermostWebContents(); |