| 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_RENDERER_RENDER_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 void setHasReceivedUserGesture() override; | 528 void setHasReceivedUserGesture() override; |
| 529 bool shouldReportDetailedMessageForSource( | 529 bool shouldReportDetailedMessageForSource( |
| 530 const blink::WebString& source) override; | 530 const blink::WebString& source) override; |
| 531 void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 531 void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
| 532 const blink::WebString& source_name, | 532 const blink::WebString& source_name, |
| 533 unsigned source_line, | 533 unsigned source_line, |
| 534 const blink::WebString& stack_trace) override; | 534 const blink::WebString& stack_trace) override; |
| 535 void loadURLExternally(const blink::WebURLRequest& request, | 535 void loadURLExternally(const blink::WebURLRequest& request, |
| 536 blink::WebNavigationPolicy policy, | 536 blink::WebNavigationPolicy policy, |
| 537 const blink::WebString& suggested_name, | 537 const blink::WebString& suggested_name, |
| 538 bool should_replace_current_entry) override; | 538 blink::WebFrameLoadType load_type) override; |
| 539 void loadErrorPage(int reason) override; | 539 void loadErrorPage(int reason) override; |
| 540 blink::WebNavigationPolicy decidePolicyForNavigation( | 540 blink::WebNavigationPolicy decidePolicyForNavigation( |
| 541 const NavigationPolicyInfo& info) override; | 541 const NavigationPolicyInfo& info) override; |
| 542 blink::WebHistoryItem historyItemForNewChildFrame() override; | 542 blink::WebHistoryItem historyItemForNewChildFrame() override; |
| 543 void willSendSubmitEvent(const blink::WebFormElement& form) override; | 543 void willSendSubmitEvent(const blink::WebFormElement& form) override; |
| 544 void willSubmitForm(const blink::WebFormElement& form) override; | 544 void willSubmitForm(const blink::WebFormElement& form) override; |
| 545 void didCreateDataSource(blink::WebLocalFrame* frame, | 545 void didCreateDataSource(blink::WebLocalFrame* frame, |
| 546 blink::WebDataSource* datasource) override; | 546 blink::WebDataSource* datasource) override; |
| 547 void didStartProvisionalLoad(blink::WebLocalFrame* frame) override; | 547 void didStartProvisionalLoad(blink::WebDataSource* ds, |
| 548 blink::WebFrameLoadType type) override; |
| 548 void didReceiveServerRedirectForProvisionalLoad( | 549 void didReceiveServerRedirectForProvisionalLoad( |
| 549 blink::WebLocalFrame* frame) override; | 550 blink::WebLocalFrame* frame) override; |
| 550 void didFailProvisionalLoad(blink::WebLocalFrame* frame, | 551 void didFailProvisionalLoad(blink::WebLocalFrame* frame, |
| 551 const blink::WebURLError& error, | 552 const blink::WebURLError& error, |
| 552 blink::WebHistoryCommitType commit_type) override; | 553 blink::WebHistoryCommitType commit_type) override; |
| 553 void didCommitProvisionalLoad( | 554 void didCommitProvisionalLoad( |
| 554 blink::WebLocalFrame* frame, | 555 blink::WebDataSource* data_source, |
| 556 blink::WebFrameLoadType load_type, |
| 555 const blink::WebHistoryItem& item, | 557 const blink::WebHistoryItem& item, |
| 556 blink::WebHistoryCommitType commit_type) override; | 558 blink::WebHistoryCommitType commit_type) override; |
| 557 void didCreateNewDocument(blink::WebLocalFrame* frame) override; | 559 void didCreateNewDocument(blink::WebLocalFrame* frame) override; |
| 558 void didClearWindowObject(blink::WebLocalFrame* frame) override; | 560 void didClearWindowObject(blink::WebLocalFrame* frame) override; |
| 559 void didCreateDocumentElement(blink::WebLocalFrame* frame) override; | 561 void didCreateDocumentElement(blink::WebLocalFrame* frame) override; |
| 560 void runScriptsAtDocumentElementAvailable( | 562 void runScriptsAtDocumentElementAvailable( |
| 561 blink::WebLocalFrame* frame) override; | 563 blink::WebLocalFrame* frame) override; |
| 562 void didReceiveTitle(blink::WebLocalFrame* frame, | 564 void didReceiveTitle(blink::WebLocalFrame* frame, |
| 563 const blink::WebString& title, | 565 const blink::WebString& title, |
| 564 blink::WebTextDirection direction) override; | 566 blink::WebTextDirection direction) override; |
| 565 void didChangeIcon(blink::WebLocalFrame* frame, | 567 void didChangeIcon(blink::WebLocalFrame* frame, |
| 566 blink::WebIconURL::Type icon_type) override; | 568 blink::WebIconURL::Type icon_type) override; |
| 567 void didFinishDocumentLoad(blink::WebLocalFrame* frame) override; | 569 void didFinishDocumentLoad(blink::WebLocalFrame* frame) override; |
| 568 void runScriptsAtDocumentReady(blink::WebLocalFrame* frame, | 570 void runScriptsAtDocumentReady(blink::WebLocalFrame* frame, |
| 569 bool document_is_empty) override; | 571 bool document_is_empty) override; |
| 570 void didHandleOnloadEvents(blink::WebLocalFrame* frame) override; | 572 void didHandleOnloadEvents(blink::WebLocalFrame* frame) override; |
| 571 void didFailLoad(blink::WebLocalFrame* frame, | 573 void didFailLoad(blink::WebLocalFrame* frame, |
| 572 const blink::WebURLError& error, | 574 const blink::WebURLError& error, |
| 573 blink::WebHistoryCommitType commit_type) override; | 575 blink::WebHistoryCommitType commit_type) override; |
| 574 void didFinishLoad(blink::WebLocalFrame* frame) override; | 576 void didFinishLoad(blink::WebLocalFrame* frame) override; |
| 575 void didNavigateWithinPage(blink::WebLocalFrame* frame, | 577 void didNavigateWithinPage(blink::WebDataSource* data_source, |
| 578 blink::WebFrameLoadType load_type, |
| 576 const blink::WebHistoryItem& item, | 579 const blink::WebHistoryItem& item, |
| 577 blink::WebHistoryCommitType commit_type, | 580 blink::WebHistoryCommitType commit_type, |
| 578 bool content_initiated) override; | 581 bool content_initiated) override; |
| 579 void didUpdateCurrentHistoryItem() override; | 582 void didUpdateCurrentHistoryItem() override; |
| 580 void didChangeThemeColor() override; | 583 void didChangeThemeColor() override; |
| 581 void dispatchLoad() override; | 584 void dispatchLoad() override; |
| 582 blink::WebEffectiveConnectionType getEffectiveConnectionType() override; | 585 blink::WebEffectiveConnectionType getEffectiveConnectionType() override; |
| 583 void didChangeSelection(bool is_empty_selection) override; | 586 void didChangeSelection(bool is_empty_selection) override; |
| 584 bool handleCurrentKeyboardEvent() override; | 587 bool handleCurrentKeyboardEvent() override; |
| 585 blink::WebColorChooser* createColorChooser( | 588 blink::WebColorChooser* createColorChooser( |
| 586 blink::WebColorChooserClient* client, | 589 blink::WebColorChooserClient* client, |
| 587 const blink::WebColor& initial_color, | 590 const blink::WebColor& initial_color, |
| 588 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override; | 591 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override; |
| 589 void runModalAlertDialog(const blink::WebString& message) override; | 592 void runModalAlertDialog(const blink::WebString& message) override; |
| 590 bool runModalConfirmDialog(const blink::WebString& message) override; | 593 bool runModalConfirmDialog(const blink::WebString& message) override; |
| 591 bool runModalPromptDialog(const blink::WebString& message, | 594 bool runModalPromptDialog(const blink::WebString& message, |
| 592 const blink::WebString& default_value, | 595 const blink::WebString& default_value, |
| 593 blink::WebString* actual_value) override; | 596 blink::WebString* actual_value) override; |
| 594 bool runModalBeforeUnloadDialog(bool is_reload) override; | 597 bool runModalBeforeUnloadDialog(bool is_reload) override; |
| 595 bool runFileChooser( | 598 bool runFileChooser( |
| 596 const blink::WebFileChooserParams& params, | 599 const blink::WebFileChooserParams& params, |
| 597 blink::WebFileChooserCompletion* chooser_completion) override; | 600 blink::WebFileChooserCompletion* chooser_completion) override; |
| 598 void showContextMenu(const blink::WebContextMenuData& data) override; | 601 void showContextMenu(const blink::WebContextMenuData& data) override; |
| 599 void saveImageFromDataURL(const blink::WebString& data_url) override; | 602 void saveImageFromDataURL(const blink::WebString& data_url) override; |
| 600 void willSendRequest(blink::WebLocalFrame* frame, | 603 void willSendRequest(blink::WebLocalFrame* frame, |
| 601 blink::WebURLRequest& request) override; | 604 blink::WebURLRequest& request, |
| 605 blink::WebFrameLoadType load_type) override; |
| 602 void didReceiveResponse(const blink::WebURLResponse& response) override; | 606 void didReceiveResponse(const blink::WebURLResponse& response) override; |
| 603 void didLoadResourceFromMemoryCache( | 607 void didLoadResourceFromMemoryCache( |
| 604 const blink::WebURLRequest& request, | 608 const blink::WebURLRequest& request, |
| 605 const blink::WebURLResponse& response) override; | 609 const blink::WebURLResponse& response) override; |
| 606 void didDisplayInsecureContent() override; | 610 void didDisplayInsecureContent() override; |
| 607 void didRunInsecureContent(const blink::WebSecurityOrigin& origin, | 611 void didRunInsecureContent(const blink::WebSecurityOrigin& origin, |
| 608 const blink::WebURL& target) override; | 612 const blink::WebURL& target) override; |
| 609 void didDisplayContentWithCertificateErrors( | 613 void didDisplayContentWithCertificateErrors( |
| 610 const blink::WebURL& url) override; | 614 const blink::WebURL& url) override; |
| 611 void didRunContentWithCertificateErrors(const blink::WebURL& url) override; | 615 void didRunContentWithCertificateErrors(const blink::WebURL& url) override; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 void BindToWebFrame(blink::WebLocalFrame* web_frame); | 790 void BindToWebFrame(blink::WebLocalFrame* web_frame); |
| 787 | 791 |
| 788 // Functions to add and remove observers for this object. | 792 // Functions to add and remove observers for this object. |
| 789 void AddObserver(RenderFrameObserver* observer); | 793 void AddObserver(RenderFrameObserver* observer); |
| 790 void RemoveObserver(RenderFrameObserver* observer); | 794 void RemoveObserver(RenderFrameObserver* observer); |
| 791 | 795 |
| 792 bool IsLocalRoot() const; | 796 bool IsLocalRoot() const; |
| 793 const RenderFrameImpl* GetLocalRoot() const; | 797 const RenderFrameImpl* GetLocalRoot() const; |
| 794 | 798 |
| 795 // Builds and sends DidCommitProvisionalLoad to the host. | 799 // Builds and sends DidCommitProvisionalLoad to the host. |
| 796 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, | 800 void SendDidCommitProvisionalLoad(blink::WebDataSource* data_source, |
| 797 blink::WebHistoryCommitType commit_type, | 801 blink::WebFrameLoadType load_type, |
| 798 const blink::WebHistoryItem& item); | 802 const blink::WebHistoryItem& item); |
| 799 | 803 |
| 800 // Swaps the current frame into the frame tree, replacing the | 804 // Swaps the current frame into the frame tree, replacing the |
| 801 // RenderFrameProxy it is associated with. Return value indicates whether | 805 // RenderFrameProxy it is associated with. Return value indicates whether |
| 802 // the swap operation succeeded. This should only be used for provisional | 806 // the swap operation succeeded. This should only be used for provisional |
| 803 // frames associated with a proxy, while the proxy is still in the frame | 807 // frames associated with a proxy, while the proxy is still in the frame |
| 804 // tree. If the associated proxy has been detached before this is called, | 808 // tree. If the associated proxy has been detached before this is called, |
| 805 // this returns false and aborts the swap. | 809 // this returns false and aborts the swap. |
| 806 bool SwapIn(); | 810 bool SwapIn(); |
| 807 | 811 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 // |is_history_navigation_in_new_child| is true, the browser process should | 933 // |is_history_navigation_in_new_child| is true, the browser process should |
| 930 // look for a matching FrameNavigationEntry in the last committed entry to use | 934 // look for a matching FrameNavigationEntry in the last committed entry to use |
| 931 // instead of |url|. | 935 // instead of |url|. |
| 932 void OpenURL( | 936 void OpenURL( |
| 933 const GURL& url, | 937 const GURL& url, |
| 934 bool uses_post, | 938 bool uses_post, |
| 935 const scoped_refptr<ResourceRequestBodyImpl>& resource_request_body, | 939 const scoped_refptr<ResourceRequestBodyImpl>& resource_request_body, |
| 936 const std::string& extra_headers, | 940 const std::string& extra_headers, |
| 937 const Referrer& referrer, | 941 const Referrer& referrer, |
| 938 blink::WebNavigationPolicy policy, | 942 blink::WebNavigationPolicy policy, |
| 939 bool should_replace_current_entry, | 943 blink::WebFrameLoadType load_type); |
| 940 bool is_history_navigation_in_new_child); | |
| 941 | 944 |
| 942 // Performs a navigation in the frame. This provides a unified function for | 945 // Performs a navigation in the frame. This provides a unified function for |
| 943 // the current code path and the browser-side navigation path (in | 946 // the current code path and the browser-side navigation path (in |
| 944 // development). Currently used by OnNavigate, with all *NavigationParams | 947 // development). Currently used by OnNavigate, with all *NavigationParams |
| 945 // provided by the browser. |stream_params| should be null. | 948 // provided by the browser. |stream_params| should be null. |
| 946 // PlzNavigate: used by OnCommitNavigation, with |common_params| and | 949 // PlzNavigate: used by OnCommitNavigation, with |common_params| and |
| 947 // |request_params| received by the browser. |stream_params| should be non | 950 // |request_params| received by the browser. |stream_params| should be non |
| 948 // null and created from the information provided by the browser. | 951 // null and created from the information provided by the browser. |
| 949 // |start_params| is not used. | 952 // |start_params| is not used. |
| 950 void NavigateInternal( | 953 void NavigateInternal( |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 bool browser_side_navigation_pending_ = false; | 1380 bool browser_side_navigation_pending_ = false; |
| 1378 | 1381 |
| 1379 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1382 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1380 | 1383 |
| 1381 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1384 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1382 }; | 1385 }; |
| 1383 | 1386 |
| 1384 } // namespace content | 1387 } // namespace content |
| 1385 | 1388 |
| 1386 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1389 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |