| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 class RenderWidgetHostDelegate; | 63 class RenderWidgetHostDelegate; |
| 64 class RenderWidgetHostImpl; | 64 class RenderWidgetHostImpl; |
| 65 class RenderWidgetHostView; | 65 class RenderWidgetHostView; |
| 66 class ResourceRequestBody; | 66 class ResourceRequestBody; |
| 67 class StreamHandle; | 67 class StreamHandle; |
| 68 class TimeoutMonitor; | 68 class TimeoutMonitor; |
| 69 struct ContextMenuParams; | 69 struct ContextMenuParams; |
| 70 struct GlobalRequestID; | 70 struct GlobalRequestID; |
| 71 struct Referrer; | 71 struct Referrer; |
| 72 struct ResourceResponse; | 72 struct ResourceResponse; |
| 73 struct TransitionLayerData; | |
| 74 | 73 |
| 75 // Flag arguments for RenderFrameHost creation. | 74 // Flag arguments for RenderFrameHost creation. |
| 76 enum CreateRenderFrameFlags { | 75 enum CreateRenderFrameFlags { |
| 77 // The RFH will be initially placed on the swapped out hosts list. | 76 // The RFH will be initially placed on the swapped out hosts list. |
| 78 CREATE_RF_SWAPPED_OUT = 1 << 0, | 77 CREATE_RF_SWAPPED_OUT = 1 << 0, |
| 79 // The new RenderFrame is being created for a navigation of the | 78 // The new RenderFrame is being created for a navigation of the |
| 80 // top-level frame. | 79 // top-level frame. |
| 81 CREATE_RF_FOR_MAIN_FRAME_NAVIGATION = 1 << 1, | 80 CREATE_RF_FOR_MAIN_FRAME_NAVIGATION = 1 << 1, |
| 82 // The RenderFrame is initially hidden. | 81 // The RenderFrame is initially hidden. |
| 83 CREATE_RF_HIDDEN = 1 << 2, | 82 CREATE_RF_HIDDEN = 1 << 2, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // handler and determine whether a transfer to a different RenderFrameHost is | 250 // handler and determine whether a transfer to a different RenderFrameHost is |
| 252 // needed. | 251 // needed. |
| 253 void OnCrossSiteResponse( | 252 void OnCrossSiteResponse( |
| 254 const GlobalRequestID& global_request_id, | 253 const GlobalRequestID& global_request_id, |
| 255 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request, | 254 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request, |
| 256 const std::vector<GURL>& transfer_url_chain, | 255 const std::vector<GURL>& transfer_url_chain, |
| 257 const Referrer& referrer, | 256 const Referrer& referrer, |
| 258 ui::PageTransition page_transition, | 257 ui::PageTransition page_transition, |
| 259 bool should_replace_current_entry); | 258 bool should_replace_current_entry); |
| 260 | 259 |
| 261 // Called on the current RenderFrameHost when the network response is first | |
| 262 // receieved. | |
| 263 void OnDeferredAfterResponseStarted( | |
| 264 const GlobalRequestID& global_request_id, | |
| 265 const TransitionLayerData& transition_data); | |
| 266 | |
| 267 // Tells the renderer that this RenderFrame is being swapped out for one in a | 260 // Tells the renderer that this RenderFrame is being swapped out for one in a |
| 268 // different renderer process. It should run its unload handler and move to | 261 // different renderer process. It should run its unload handler and move to |
| 269 // a blank document. If |proxy| is not null, it should also create a | 262 // a blank document. If |proxy| is not null, it should also create a |
| 270 // RenderFrameProxy to replace the RenderFrame and set it to |is_loading| | 263 // RenderFrameProxy to replace the RenderFrame and set it to |is_loading| |
| 271 // state. The renderer should preserve the RenderFrameProxy object until it | 264 // state. The renderer should preserve the RenderFrameProxy object until it |
| 272 // exits, in case we come back. The renderer can exit if it has no other | 265 // exits, in case we come back. The renderer can exit if it has no other |
| 273 // active RenderFrames, but not until WasSwappedOut is called. | 266 // active RenderFrames, but not until WasSwappedOut is called. |
| 274 void SwapOut(RenderFrameProxyHost* proxy, bool is_loading); | 267 void SwapOut(RenderFrameProxyHost* proxy, bool is_loading); |
| 275 | 268 |
| 276 // Whether an ongoing navigation is waiting for a BeforeUnload ACK from the | 269 // Whether an ongoing navigation is waiting for a BeforeUnload ACK from the |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 // before and after the selection or caret. | 350 // before and after the selection or caret. |
| 358 void ExtendSelectionAndDelete(size_t before, size_t after); | 351 void ExtendSelectionAndDelete(size_t before, size_t after); |
| 359 | 352 |
| 360 // Notifies the RenderFrame that the JavaScript message that was shown was | 353 // Notifies the RenderFrame that the JavaScript message that was shown was |
| 361 // closed by the user. | 354 // closed by the user. |
| 362 void JavaScriptDialogClosed(IPC::Message* reply_msg, | 355 void JavaScriptDialogClosed(IPC::Message* reply_msg, |
| 363 bool success, | 356 bool success, |
| 364 const base::string16& user_input, | 357 const base::string16& user_input, |
| 365 bool dialog_was_suppressed); | 358 bool dialog_was_suppressed); |
| 366 | 359 |
| 367 // Clears any outstanding transition request. This is called when we hear the | |
| 368 // response or commit. | |
| 369 void ClearPendingTransitionRequestData(); | |
| 370 | |
| 371 // Send a message to the renderer process to change the accessibility mode. | 360 // Send a message to the renderer process to change the accessibility mode. |
| 372 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); | 361 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); |
| 373 | 362 |
| 374 // Request a one-time snapshot of the accessibility tree without changing | 363 // Request a one-time snapshot of the accessibility tree without changing |
| 375 // the accessibility mode. | 364 // the accessibility mode. |
| 376 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback); | 365 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback); |
| 377 | 366 |
| 378 // Turn on accessibility testing. The given callback will be run | 367 // Turn on accessibility testing. The given callback will be run |
| 379 // every time an accessibility notification is received from the | 368 // every time an accessibility notification is received from the |
| 380 // renderer process, and the accessibility tree it sent can be | 369 // renderer process, and the accessibility tree it sent can be |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 void OnAddMessageToConsole(int32 level, | 460 void OnAddMessageToConsole(int32 level, |
| 472 const base::string16& message, | 461 const base::string16& message, |
| 473 int32 line_no, | 462 int32 line_no, |
| 474 const base::string16& source_id); | 463 const base::string16& source_id); |
| 475 void OnDetach(); | 464 void OnDetach(); |
| 476 void OnFrameFocused(); | 465 void OnFrameFocused(); |
| 477 void OnOpenURL(const FrameHostMsg_OpenURL_Params& params); | 466 void OnOpenURL(const FrameHostMsg_OpenURL_Params& params); |
| 478 void OnDocumentOnLoadCompleted( | 467 void OnDocumentOnLoadCompleted( |
| 479 FrameMsg_UILoadMetricsReportType::Value report_type, | 468 FrameMsg_UILoadMetricsReportType::Value report_type, |
| 480 base::TimeTicks ui_timestamp); | 469 base::TimeTicks ui_timestamp); |
| 481 void OnDidStartProvisionalLoadForFrame(const GURL& url, | 470 void OnDidStartProvisionalLoadForFrame(const GURL& url); |
| 482 bool is_transition_navigation); | |
| 483 void OnDidFailProvisionalLoadWithError( | 471 void OnDidFailProvisionalLoadWithError( |
| 484 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); | 472 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); |
| 485 void OnDidFailLoadWithError( | 473 void OnDidFailLoadWithError( |
| 486 const GURL& url, | 474 const GURL& url, |
| 487 int error_code, | 475 int error_code, |
| 488 const base::string16& error_description); | 476 const base::string16& error_description); |
| 489 void OnDidCommitProvisionalLoad(const IPC::Message& msg); | 477 void OnDidCommitProvisionalLoad(const IPC::Message& msg); |
| 490 void OnDidDropNavigation(); | 478 void OnDidDropNavigation(); |
| 491 void OnBeforeUnloadACK( | 479 void OnBeforeUnloadACK( |
| 492 bool proceed, | 480 bool proceed, |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 | 721 |
| 734 // NOTE: This must be the last member. | 722 // NOTE: This must be the last member. |
| 735 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 723 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 736 | 724 |
| 737 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 725 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 738 }; | 726 }; |
| 739 | 727 |
| 740 } // namespace content | 728 } // namespace content |
| 741 | 729 |
| 742 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 730 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |