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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 class FrameTree; | 56 class FrameTree; |
57 class FrameTreeNode; | 57 class FrameTreeNode; |
58 class PermissionServiceContext; | 58 class PermissionServiceContext; |
59 class RenderFrameHostDelegate; | 59 class RenderFrameHostDelegate; |
60 class RenderFrameProxyHost; | 60 class RenderFrameProxyHost; |
61 class RenderProcessHost; | 61 class RenderProcessHost; |
62 class RenderViewHostImpl; | 62 class RenderViewHostImpl; |
63 class RenderWidgetHostDelegate; | 63 class RenderWidgetHostDelegate; |
64 class RenderWidgetHostImpl; | 64 class RenderWidgetHostImpl; |
65 class RenderWidgetHostView; | 65 class RenderWidgetHostView; |
| 66 class ResourceRequestBody; |
66 class StreamHandle; | 67 class StreamHandle; |
67 class TimeoutMonitor; | 68 class TimeoutMonitor; |
| 69 struct BeginNavigationParams; |
68 struct CommitNavigationParams; | 70 struct CommitNavigationParams; |
69 struct CommonNavigationParams; | 71 struct CommonNavigationParams; |
70 struct ContextMenuParams; | 72 struct ContextMenuParams; |
71 struct GlobalRequestID; | 73 struct GlobalRequestID; |
72 struct Referrer; | 74 struct Referrer; |
73 struct ResourceResponse; | 75 struct ResourceResponse; |
74 struct TransitionLayerData; | 76 struct TransitionLayerData; |
75 | 77 |
76 // Flag arguments for RenderFrameHost creation. | 78 // Flag arguments for RenderFrameHost creation. |
77 enum CreateRenderFrameFlags { | 79 enum CreateRenderFrameFlags { |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // user decided the navigation should proceed should be passed as | 320 // user decided the navigation should proceed should be passed as |
319 // |proceed_time|. | 321 // |proceed_time|. |
320 void SetNavigationsSuspended(bool suspend, | 322 void SetNavigationsSuspended(bool suspend, |
321 const base::TimeTicks& proceed_time); | 323 const base::TimeTicks& proceed_time); |
322 | 324 |
323 // Clears any suspended navigation state after a cross-site navigation is | 325 // Clears any suspended navigation state after a cross-site navigation is |
324 // canceled or suspended. This is important if we later return to this | 326 // canceled or suspended. This is important if we later return to this |
325 // RenderFrameHost. | 327 // RenderFrameHost. |
326 void CancelSuspendedNavigations(); | 328 void CancelSuspendedNavigations(); |
327 | 329 |
328 // Runs the beforeunload handler for this frame. |for_cross_site_transition| | 330 // Runs the beforeunload handler for this frame. |for_navigation| indicates |
329 // indicates whether this call is for the current frame during a cross-process | 331 // whether this call is for the current frame during a cross-process |
330 // navigation. False means we're closing the entire tab. | 332 // navigation. False means we're closing the entire tab. |
331 void DispatchBeforeUnload(bool for_cross_site_transition); | 333 // PlzNavigate: this call happens on all browser-initiated navigations. |
| 334 void DispatchBeforeUnload(bool for_navigation); |
332 | 335 |
333 // Set the frame's opener to null in the renderer process in response to an | 336 // Set the frame's opener to null in the renderer process in response to an |
334 // action in another renderer process. | 337 // action in another renderer process. |
335 void DisownOpener(); | 338 void DisownOpener(); |
336 | 339 |
337 // Deletes the current selection plus the specified number of characters | 340 // Deletes the current selection plus the specified number of characters |
338 // before and after the selection or caret. | 341 // before and after the selection or caret. |
339 void ExtendSelectionAndDelete(size_t before, size_t after); | 342 void ExtendSelectionAndDelete(size_t before, size_t after); |
340 | 343 |
341 // Notifies the RenderFrame that the JavaScript message that was shown was | 344 // Notifies the RenderFrame that the JavaScript message that was shown was |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 IPC::Message* reply_msg); | 475 IPC::Message* reply_msg); |
473 void OnTextSurroundingSelectionResponse(const base::string16& content, | 476 void OnTextSurroundingSelectionResponse(const base::string16& content, |
474 size_t start_offset, | 477 size_t start_offset, |
475 size_t end_offset); | 478 size_t end_offset); |
476 void OnDidAccessInitialDocument(); | 479 void OnDidAccessInitialDocument(); |
477 void OnDidDisownOpener(); | 480 void OnDidDisownOpener(); |
478 void OnDidAssignPageId(int32 page_id); | 481 void OnDidAssignPageId(int32 page_id); |
479 void OnUpdateTitle(const base::string16& title, | 482 void OnUpdateTitle(const base::string16& title, |
480 blink::WebTextDirection title_direction); | 483 blink::WebTextDirection title_direction); |
481 void OnUpdateEncoding(const std::string& encoding); | 484 void OnUpdateEncoding(const std::string& encoding); |
482 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params, | 485 void OnBeginNavigation(const CommonNavigationParams& common_params, |
483 const CommonNavigationParams& common_params); | 486 const BeginNavigationParams& begin_params, |
| 487 scoped_refptr<ResourceRequestBody> body); |
484 void OnAccessibilityEvents( | 488 void OnAccessibilityEvents( |
485 const std::vector<AccessibilityHostMsg_EventParams>& params, | 489 const std::vector<AccessibilityHostMsg_EventParams>& params, |
486 int reset_token); | 490 int reset_token); |
487 void OnAccessibilityLocationChanges( | 491 void OnAccessibilityLocationChanges( |
488 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); | 492 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); |
489 void OnAccessibilityFindInPageResult( | 493 void OnAccessibilityFindInPageResult( |
490 const AccessibilityHostMsg_FindInPageResultParams& params); | 494 const AccessibilityHostMsg_FindInPageResultParams& params); |
491 void OnToggleFullscreen(bool enter_fullscreen); | 495 void OnToggleFullscreen(bool enter_fullscreen); |
492 | 496 |
493 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 497 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 // When either this value or IsWaitingForUnloadACK is true, the value of | 621 // When either this value or IsWaitingForUnloadACK is true, the value of |
618 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a | 622 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a |
619 // cross-site transition or a tab close attempt. | 623 // cross-site transition or a tab close attempt. |
620 // TODO(clamy): Remove this boolean and add one more state to the state | 624 // TODO(clamy): Remove this boolean and add one more state to the state |
621 // machine. | 625 // machine. |
622 bool is_waiting_for_beforeunload_ack_; | 626 bool is_waiting_for_beforeunload_ack_; |
623 | 627 |
624 // Valid only when is_waiting_for_beforeunload_ack_ or | 628 // Valid only when is_waiting_for_beforeunload_ack_ or |
625 // IsWaitingForUnloadACK is true. This tells us if the unload request | 629 // IsWaitingForUnloadACK is true. This tells us if the unload request |
626 // is for closing the entire tab ( = false), or only this RenderFrameHost in | 630 // is for closing the entire tab ( = false), or only this RenderFrameHost in |
627 // the case of a cross-site transition ( = true). | 631 // the case of a navigation ( = true). Currently only cross-site navigations |
628 bool unload_ack_is_for_cross_site_transition_; | 632 // require a beforeUnload/unload ACK. |
| 633 // PlzNavigate: all navigations require a beforeUnload ACK. |
| 634 bool unload_ack_is_for_navigation_; |
629 | 635 |
630 // Used to swap out or shut down this RFH when the unload event is taking too | 636 // Used to swap out or shut down this RFH when the unload event is taking too |
631 // long to execute, depending on the number of active frames in the | 637 // long to execute, depending on the number of active frames in the |
632 // SiteInstance. | 638 // SiteInstance. |
633 scoped_ptr<TimeoutMonitor> swapout_event_monitor_timeout_; | 639 scoped_ptr<TimeoutMonitor> swapout_event_monitor_timeout_; |
634 | 640 |
635 scoped_ptr<ServiceRegistryImpl> service_registry_; | 641 scoped_ptr<ServiceRegistryImpl> service_registry_; |
636 | 642 |
637 #if defined(OS_ANDROID) | 643 #if defined(OS_ANDROID) |
638 scoped_ptr<ServiceRegistryAndroid> service_registry_android_; | 644 scoped_ptr<ServiceRegistryAndroid> service_registry_android_; |
(...skipping 28 matching lines...) Expand all Loading... |
667 | 673 |
668 // NOTE: This must be the last member. | 674 // NOTE: This must be the last member. |
669 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 675 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
670 | 676 |
671 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 677 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
672 }; | 678 }; |
673 | 679 |
674 } // namespace content | 680 } // namespace content |
675 | 681 |
676 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 682 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |