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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 1143333003: Eliminate redundancy in the parameters to NotifyEntryChanged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 if (session_service) 1107 if (session_service)
1108 session_service->TabClosing(old_contents); 1108 session_service->TabClosing(old_contents);
1109 TabInsertedAt(new_contents, 1109 TabInsertedAt(new_contents,
1110 index, 1110 index,
1111 (index == tab_strip_model_->active_index())); 1111 (index == tab_strip_model_->active_index()));
1112 1112
1113 int entry_count = new_contents->GetController().GetEntryCount(); 1113 int entry_count = new_contents->GetController().GetEntryCount();
1114 if (entry_count > 0) { 1114 if (entry_count > 0) {
1115 // Send out notification so that observers are updated appropriately. 1115 // Send out notification so that observers are updated appropriately.
1116 new_contents->GetController().NotifyEntryChanged( 1116 new_contents->GetController().NotifyEntryChanged(
1117 new_contents->GetController().GetEntryAtIndex(entry_count - 1), 1117 new_contents->GetController().GetEntryAtIndex(entry_count - 1));
1118 entry_count - 1);
1119 } 1118 }
1120 1119
1121 if (session_service) { 1120 if (session_service) {
1122 // The new_contents may end up with a different navigation stack. Force 1121 // The new_contents may end up with a different navigation stack. Force
1123 // the session service to update itself. 1122 // the session service to update itself.
1124 session_service->TabRestored(new_contents, 1123 session_service->TabRestored(new_contents,
1125 tab_strip_model_->IsTabPinned(index)); 1124 tab_strip_model_->IsTabPinned(index));
1126 } 1125 }
1127 } 1126 }
1128 1127
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
2603 if (contents && !allow_js_access) { 2602 if (contents && !allow_js_access) {
2604 contents->web_contents()->GetController().LoadURL( 2603 contents->web_contents()->GetController().LoadURL(
2605 target_url, 2604 target_url,
2606 content::Referrer(), 2605 content::Referrer(),
2607 ui::PAGE_TRANSITION_LINK, 2606 ui::PAGE_TRANSITION_LINK,
2608 std::string()); // No extra headers. 2607 std::string()); // No extra headers.
2609 } 2608 }
2610 2609
2611 return contents != NULL; 2610 return contents != NULL;
2612 } 2611 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698