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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 const blink::WebString& suggested_name, | 546 const blink::WebString& suggested_name, |
547 bool should_replace_current_entry) override; | 547 bool should_replace_current_entry) override; |
548 void loadErrorPage(int reason) override; | 548 void loadErrorPage(int reason) override; |
549 blink::WebNavigationPolicy decidePolicyForNavigation( | 549 blink::WebNavigationPolicy decidePolicyForNavigation( |
550 const NavigationPolicyInfo& info) override; | 550 const NavigationPolicyInfo& info) override; |
551 blink::WebHistoryItem historyItemForNewChildFrame() override; | 551 blink::WebHistoryItem historyItemForNewChildFrame() override; |
552 void willSendSubmitEvent(const blink::WebFormElement& form) override; | 552 void willSendSubmitEvent(const blink::WebFormElement& form) override; |
553 void willSubmitForm(const blink::WebFormElement& form) override; | 553 void willSubmitForm(const blink::WebFormElement& form) override; |
554 void didCreateDataSource(blink::WebLocalFrame* frame, | 554 void didCreateDataSource(blink::WebLocalFrame* frame, |
555 blink::WebDataSource* datasource) override; | 555 blink::WebDataSource* datasource) override; |
556 void didStartProvisionalLoad(blink::WebDataSource* data_source) override; | 556 void didStartProvisionalLoad(blink::WebDataSource* data_source, |
| 557 blink::WebURLRequest& request) override; |
557 void didReceiveServerRedirectForProvisionalLoad( | 558 void didReceiveServerRedirectForProvisionalLoad( |
558 blink::WebLocalFrame* frame) override; | 559 blink::WebLocalFrame* frame) override; |
559 void didFailProvisionalLoad(blink::WebLocalFrame* frame, | 560 void didFailProvisionalLoad(blink::WebLocalFrame* frame, |
560 const blink::WebURLError& error, | 561 const blink::WebURLError& error, |
561 blink::WebHistoryCommitType commit_type) override; | 562 blink::WebHistoryCommitType commit_type) override; |
562 void didCommitProvisionalLoad( | 563 void didCommitProvisionalLoad( |
563 blink::WebLocalFrame* frame, | 564 blink::WebLocalFrame* frame, |
564 const blink::WebHistoryItem& item, | 565 const blink::WebHistoryItem& item, |
565 blink::WebHistoryCommitType commit_type) override; | 566 blink::WebHistoryCommitType commit_type) override; |
566 void didCreateNewDocument(blink::WebLocalFrame* frame) override; | 567 void didCreateNewDocument(blink::WebLocalFrame* frame) override; |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 // TODO(dcheng): Remove these members. | 1390 // TODO(dcheng): Remove these members. |
1390 bool committed_first_load_ = false; | 1391 bool committed_first_load_ = false; |
1391 bool name_changed_before_first_commit_ = false; | 1392 bool name_changed_before_first_commit_ = false; |
1392 | 1393 |
1393 bool browser_side_navigation_pending_ = false; | 1394 bool browser_side_navigation_pending_ = false; |
1394 | 1395 |
1395 // A bitwise OR of bindings types that have been enabled for this RenderFrame. | 1396 // A bitwise OR of bindings types that have been enabled for this RenderFrame. |
1396 // See BindingsPolicy for details. | 1397 // See BindingsPolicy for details. |
1397 int enabled_bindings_ = 0; | 1398 int enabled_bindings_ = 0; |
1398 | 1399 |
| 1400 // PlzNavigate: |
| 1401 // Contains information about a pending navigation to be sent to the browser. |
| 1402 // We save information about the navigation in decidePolicyForNavigation(). |
| 1403 // The navigation is sent to the browser in didStartProvisionalLoad(). |
| 1404 // Please see the BeginNavigation() for information. |
| 1405 struct PendingNavigationInfo { |
| 1406 blink::WebNavigationType navigation_type; |
| 1407 blink::WebNavigationPolicy policy; |
| 1408 bool replaces_current_history_item; |
| 1409 bool history_navigation_in_new_child_frame; |
| 1410 bool client_redirect; |
| 1411 bool cache_disabled; |
| 1412 blink::WebFormElement form; |
| 1413 |
| 1414 PendingNavigationInfo(const NavigationPolicyInfo& info) |
| 1415 : navigation_type(info.navigationType), |
| 1416 policy(info.defaultPolicy), |
| 1417 replaces_current_history_item(info.replacesCurrentHistoryItem), |
| 1418 history_navigation_in_new_child_frame( |
| 1419 info.isHistoryNavigationInNewChildFrame), |
| 1420 client_redirect(info.isClientRedirect), |
| 1421 cache_disabled(info.isCacheDisabled), |
| 1422 form(info.form) {} |
| 1423 }; |
| 1424 |
| 1425 // PlzNavigate: Contains information about a pending navigation to be sent to |
| 1426 // the browser. This state is allocated in decidePolicyForNavigation() and |
| 1427 // is used and released in didStartProvisionalLoad(). |
| 1428 std::unique_ptr<PendingNavigationInfo> pending_navigation_info_; |
| 1429 |
1399 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1430 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1400 | 1431 |
1401 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1432 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1402 }; | 1433 }; |
1403 | 1434 |
1404 } // namespace content | 1435 } // namespace content |
1405 | 1436 |
1406 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1437 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |