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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2728 // it needs to set RenderViewImpl's pointer for the main frame to itself | 2728 // it needs to set RenderViewImpl's pointer for the main frame to itself |
2729 // and ensure RenderWidget is no longer in swapped out mode. | 2729 // and ensure RenderWidget is no longer in swapped out mode. |
2730 if (is_main_frame_) { | 2730 if (is_main_frame_) { |
2731 CHECK(!render_view_->main_render_frame_); | 2731 CHECK(!render_view_->main_render_frame_); |
2732 render_view_->main_render_frame_ = this; | 2732 render_view_->main_render_frame_ = this; |
2733 if (render_view_->is_swapped_out()) | 2733 if (render_view_->is_swapped_out()) |
2734 render_view_->SetSwappedOut(false); | 2734 render_view_->SetSwappedOut(false); |
2735 } | 2735 } |
2736 } | 2736 } |
2737 | 2737 |
2738 // For new page navigations, the browser process needs to be notified of the | |
2739 // first paint of that page, so it can cancel the timer that waits for it. | |
Charlie Reis
2015/10/01 21:26:39
nit: (or skip the timer if the paint IPC is handle
kenrb
2015/10/02 13:24:40
Done.
| |
2740 if (is_main_frame_ && !navigation_state->WasWithinSamePage()) { | |
2741 render_view_->QueueMessage( | |
Charlie Reis
2015/10/01 21:26:39
There's some magic here I don't fully understand,
| |
2742 new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_), | |
2743 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); | |
2744 } | |
2745 | |
2738 // When we perform a new navigation, we need to update the last committed | 2746 // When we perform a new navigation, we need to update the last committed |
2739 // session history entry with state for the page we are leaving. Do this | 2747 // session history entry with state for the page we are leaving. Do this |
2740 // before updating the HistoryController state. | 2748 // before updating the HistoryController state. |
2741 render_view_->SendUpdateState(); | 2749 render_view_->SendUpdateState(); |
2742 | 2750 |
2743 render_view_->history_controller()->UpdateForCommit( | 2751 render_view_->history_controller()->UpdateForCommit( |
2744 this, item, commit_type, navigation_state->WasWithinSamePage()); | 2752 this, item, commit_type, navigation_state->WasWithinSamePage()); |
2745 | 2753 |
2746 InternalDocumentStateData* internal_data = | 2754 InternalDocumentStateData* internal_data = |
2747 InternalDocumentStateData::FromDocumentState(document_state); | 2755 InternalDocumentStateData::FromDocumentState(document_state); |
(...skipping 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5174 mojo::ServiceProviderPtr service_provider; | 5182 mojo::ServiceProviderPtr service_provider; |
5175 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5183 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
5176 request->url = mojo::String::From(url); | 5184 request->url = mojo::String::From(url); |
5177 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5185 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
5178 nullptr, nullptr, | 5186 nullptr, nullptr, |
5179 base::Bind(&OnGotContentHandlerID)); | 5187 base::Bind(&OnGotContentHandlerID)); |
5180 return service_provider.Pass(); | 5188 return service_provider.Pass(); |
5181 } | 5189 } |
5182 | 5190 |
5183 } // namespace content | 5191 } // namespace content |
OLD | NEW |