Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2023013002: Prevent renderer kills for in-page navigations on subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests and fix, clean up. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3252 matching lines...) Expand 10 before | Expand all | Expand 10 after
3263 render_view_->QueueMessage( 3263 render_view_->QueueMessage(
3264 new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_), 3264 new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_),
3265 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); 3265 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE);
3266 } 3266 }
3267 3267
3268 // When we perform a new navigation, we need to update the last committed 3268 // When we perform a new navigation, we need to update the last committed
3269 // session history entry with state for the page we are leaving. Do this 3269 // session history entry with state for the page we are leaving. Do this
3270 // before updating the current history item. 3270 // before updating the current history item.
3271 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { 3271 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
3272 SendUpdateState(); 3272 SendUpdateState();
3273 current_history_item_ = item;
3274 } else { 3273 } else {
3275 render_view_->SendUpdateState(); 3274 render_view_->SendUpdateState();
3276 render_view_->history_controller()->UpdateForCommit( 3275 render_view_->history_controller()->UpdateForCommit(
3277 this, item, commit_type, navigation_state->WasWithinSamePage()); 3276 this, item, commit_type, navigation_state->WasWithinSamePage());
3278 } 3277 }
3278 // Update the current history item for this frame (both in default Chrome and
3279 // subframe FrameNavigationEntry modes).
3280 current_history_item_ = item;
Charlie Reis 2016/06/03 19:20:36 We used to only keep track of this in FNE-enabled
3279 3281
3280 InternalDocumentStateData* internal_data = 3282 InternalDocumentStateData* internal_data =
3281 InternalDocumentStateData::FromDocumentState(document_state); 3283 InternalDocumentStateData::FromDocumentState(document_state);
3282 3284
3283 if (document_state->commit_load_time().is_null()) 3285 if (document_state->commit_load_time().is_null())
3284 document_state->set_commit_load_time(Time::Now()); 3286 document_state->set_commit_load_time(Time::Now());
3285 3287
3286 if (internal_data->must_reset_scroll_and_scale_state()) { 3288 if (internal_data->must_reset_scroll_and_scale_state()) {
3287 render_view_->webview()->resetScrollAndScaleState(); 3289 render_view_->webview()->resetScrollAndScaleState();
3288 internal_data->set_must_reset_scroll_and_scale_state(false); 3290 internal_data->set_must_reset_scroll_and_scale_state(false);
(...skipping 2877 matching lines...) Expand 10 before | Expand all | Expand 10 after
6166 // event target. Potentially a Pepper plugin will receive the event. 6168 // event target. Potentially a Pepper plugin will receive the event.
6167 // In order to tell whether a plugin gets the last mouse event and which it 6169 // In order to tell whether a plugin gets the last mouse event and which it
6168 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6170 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6169 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6171 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6170 // |pepper_last_mouse_event_target_|. 6172 // |pepper_last_mouse_event_target_|.
6171 pepper_last_mouse_event_target_ = nullptr; 6173 pepper_last_mouse_event_target_ = nullptr;
6172 #endif 6174 #endif
6173 } 6175 }
6174 6176
6175 } // namespace content 6177 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698