OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // special case for <webview> guests, but this logic should eventually be | 227 // special case for <webview> guests, but this logic should eventually be |
228 // moved down into RenderFrameProxyHost::RouteMessageEvent when <webview> | 228 // moved down into RenderFrameProxyHost::RouteMessageEvent when <webview> |
229 // refactoring for --site-per-process mode is further along. See | 229 // refactoring for --site-per-process mode is further along. See |
230 // https://crbug.com/330264. | 230 // https://crbug.com/330264. |
231 virtual void EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) {} | 231 virtual void EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) {} |
232 | 232 |
233 // Set the |node| frame as focused in the current FrameTree as well as | 233 // Set the |node| frame as focused in the current FrameTree as well as |
234 // possibly changing focus in distinct but related inner/outer WebContents. | 234 // possibly changing focus in distinct but related inner/outer WebContents. |
235 virtual void SetFocusedFrame(FrameTreeNode* node, SiteInstance* source) {} | 235 virtual void SetFocusedFrame(FrameTreeNode* node, SiteInstance* source) {} |
236 | 236 |
| 237 // Searches the WebContents for a focused frame, potentially in an inner |
| 238 // WebContents. If this WebContents has no focused frame, returns |nullptr|. |
| 239 // If there is no inner WebContents at the focused tree node, returns its |
| 240 // RenderFrameHost. If there is an inner WebContents, search it for focused |
| 241 // frames and inner contents. If an inner WebContents does not have a focused |
| 242 // frame, return its main frame, since the attachment frame in its outer |
| 243 // WebContents is not live. |
| 244 virtual RenderFrameHost* GetFocusedFrameIncludingInnerWebContents(); |
| 245 |
237 // Creates a WebUI object for a frame navigating to |url|. If no WebUI | 246 // Creates a WebUI object for a frame navigating to |url|. If no WebUI |
238 // applies, returns null. | 247 // applies, returns null. |
239 virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( | 248 virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( |
240 const GURL& url); | 249 const GURL& url); |
241 | 250 |
242 // Called by |frame| to notify that it has received an update on focused | 251 // Called by |frame| to notify that it has received an update on focused |
243 // element. |bounds_in_root_view| is the rectangle containing the element that | 252 // element. |bounds_in_root_view| is the rectangle containing the element that |
244 // is focused and is with respect to root frame's RenderWidgetHost's | 253 // is focused and is with respect to root frame's RenderWidgetHost's |
245 // coordinate space. | 254 // coordinate space. |
246 virtual void OnFocusedElementChangedInFrame( | 255 virtual void OnFocusedElementChangedInFrame( |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // should not be asked to create a RenderFrame. | 320 // should not be asked to create a RenderFrame. |
312 virtual bool IsBeingDestroyed() const; | 321 virtual bool IsBeingDestroyed() const; |
313 | 322 |
314 protected: | 323 protected: |
315 virtual ~RenderFrameHostDelegate() {} | 324 virtual ~RenderFrameHostDelegate() {} |
316 }; | 325 }; |
317 | 326 |
318 } // namespace content | 327 } // namespace content |
319 | 328 |
320 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 329 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
OLD | NEW |