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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2191543003: Remove existing FrameNavigationEntry when new named frame is added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed and refactored on top of TreeNode::parent. Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 4530 matching lines...) Expand 10 before | Expand all | Expand 10 after
4541 // since it must come from the same document. Do not update it if a difference 4541 // since it must come from the same document. Do not update it if a difference
4542 // is detected, as this indicates that |frame_entry| is not the correct one. 4542 // is detected, as this indicates that |frame_entry| is not the correct one.
4543 ExplodedPageState exploded_state; 4543 ExplodedPageState exploded_state;
4544 if (!DecodePageState(page_state.ToEncodedData(), &exploded_state)) 4544 if (!DecodePageState(page_state.ToEncodedData(), &exploded_state))
4545 return; 4545 return;
4546 4546
4547 if (exploded_state.top.document_sequence_number != 4547 if (exploded_state.top.document_sequence_number !=
4548 frame_entry->document_sequence_number() || 4548 frame_entry->document_sequence_number() ||
4549 exploded_state.top.item_sequence_number != 4549 exploded_state.top.item_sequence_number !=
4550 frame_entry->item_sequence_number()) { 4550 frame_entry->item_sequence_number()) {
4551 NOTREACHED();
4551 return; 4552 return;
4552 } 4553 }
4553 4554
4554 frame_entry->set_page_state(page_state); 4555 frame_entry->set_page_state(page_state);
4555 controller_.NotifyEntryChanged(entry); 4556 controller_.NotifyEntryChanged(entry);
4556 } 4557 }
4557 4558
4558 void WebContentsImpl::UpdateTitle(RenderFrameHost* render_frame_host, 4559 void WebContentsImpl::UpdateTitle(RenderFrameHost* render_frame_host,
4559 int32_t page_id, 4560 int32_t page_id,
4560 const base::string16& title, 4561 const base::string16& title,
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
5231 for (RenderViewHost* render_view_host : render_view_host_set) 5232 for (RenderViewHost* render_view_host : render_view_host_set)
5232 render_view_host->OnWebkitPreferencesChanged(); 5233 render_view_host->OnWebkitPreferencesChanged();
5233 } 5234 }
5234 5235
5235 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5236 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5236 JavaScriptDialogManager* dialog_manager) { 5237 JavaScriptDialogManager* dialog_manager) {
5237 dialog_manager_ = dialog_manager; 5238 dialog_manager_ = dialog_manager;
5238 } 5239 }
5239 5240
5240 } // namespace content 5241 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698