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 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3600 // If this is a provisional frame associated with a proxy (i.e., a frame | 3600 // If this is a provisional frame associated with a proxy (i.e., a frame |
3601 // created for a remote-to-local navigation), swap it into the frame tree | 3601 // created for a remote-to-local navigation), swap it into the frame tree |
3602 // now. | 3602 // now. |
3603 if (!SwapIn()) | 3603 if (!SwapIn()) |
3604 return; | 3604 return; |
3605 } | 3605 } |
3606 | 3606 |
3607 // For new page navigations, the browser process needs to be notified of the | 3607 // For new page navigations, the browser process needs to be notified of the |
3608 // first paint of that page, so it can cancel the timer that waits for it. | 3608 // first paint of that page, so it can cancel the timer that waits for it. |
3609 if (is_main_frame_ && !navigation_state->WasWithinSamePage()) { | 3609 if (is_main_frame_ && !navigation_state->WasWithinSamePage()) { |
3610 GetRenderWidget()->IncrementContentSourceId(); | |
3611 render_view_->QueueMessage( | 3610 render_view_->QueueMessage( |
3612 new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_), | 3611 new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_), |
3613 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); | 3612 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); |
3614 } | 3613 } |
3615 | 3614 |
3616 // When we perform a new navigation, we need to update the last committed | 3615 // When we perform a new navigation, we need to update the last committed |
3617 // session history entry with state for the page we are leaving. Do this | 3616 // session history entry with state for the page we are leaving. Do this |
3618 // before updating the current history item. | 3617 // before updating the current history item. |
3619 SendUpdateState(); | 3618 SendUpdateState(); |
3620 | 3619 |
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4873 | 4872 |
4874 params.gesture = render_view_->navigation_gesture_; | 4873 params.gesture = render_view_->navigation_gesture_; |
4875 render_view_->navigation_gesture_ = NavigationGestureUnknown; | 4874 render_view_->navigation_gesture_ = NavigationGestureUnknown; |
4876 | 4875 |
4877 // Make navigation state a part of the DidCommitProvisionalLoad message so | 4876 // Make navigation state a part of the DidCommitProvisionalLoad message so |
4878 // that committed entry has it at all times. Send a single HistoryItem for | 4877 // that committed entry has it at all times. Send a single HistoryItem for |
4879 // this frame, rather than the whole tree. It will be stored in the | 4878 // this frame, rather than the whole tree. It will be stored in the |
4880 // corresponding FrameNavigationEntry. | 4879 // corresponding FrameNavigationEntry. |
4881 params.page_state = SingleHistoryItemToPageState(item); | 4880 params.page_state = SingleHistoryItemToPageState(item); |
4882 | 4881 |
4883 params.content_source_id = GetRenderWidget()->GetContentSourceId(); | |
4884 | |
4885 params.method = request.httpMethod().latin1(); | 4882 params.method = request.httpMethod().latin1(); |
4886 if (params.method == "POST") | 4883 if (params.method == "POST") |
4887 params.post_id = ExtractPostId(item); | 4884 params.post_id = ExtractPostId(item); |
4888 | 4885 |
4889 params.frame_unique_name = item.target().utf8(); | 4886 params.frame_unique_name = item.target().utf8(); |
4890 params.item_sequence_number = item.itemSequenceNumber(); | 4887 params.item_sequence_number = item.itemSequenceNumber(); |
4891 params.document_sequence_number = item.documentSequenceNumber(); | 4888 params.document_sequence_number = item.documentSequenceNumber(); |
4892 | 4889 |
4893 // If the page contained a client redirect (meta refresh, document.loc...), | 4890 // If the page contained a client redirect (meta refresh, document.loc...), |
4894 // set the referrer appropriately. | 4891 // set the referrer appropriately. |
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6852 // event target. Potentially a Pepper plugin will receive the event. | 6849 // event target. Potentially a Pepper plugin will receive the event. |
6853 // In order to tell whether a plugin gets the last mouse event and which it | 6850 // In order to tell whether a plugin gets the last mouse event and which it |
6854 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6851 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6855 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6852 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6856 // |pepper_last_mouse_event_target_|. | 6853 // |pepper_last_mouse_event_target_|. |
6857 pepper_last_mouse_event_target_ = nullptr; | 6854 pepper_last_mouse_event_target_ = nullptr; |
6858 #endif | 6855 #endif |
6859 } | 6856 } |
6860 | 6857 |
6861 } // namespace content | 6858 } // namespace content |
OLD | NEW |