| OLD | NEW |
| 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 "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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 // exist, the change will be picked up by sessions when created. | 1130 // exist, the change will be picked up by sessions when created. |
| 1131 SessionService* session_service = | 1131 SessionService* session_service = |
| 1132 SessionServiceFactory::GetForProfileIfExisting(profile_); | 1132 SessionServiceFactory::GetForProfileIfExisting(profile_); |
| 1133 if (session_service && !tab_strip_model_->closing_all()) { | 1133 if (session_service && !tab_strip_model_->closing_all()) { |
| 1134 session_service->SetSelectedTabInWindow(session_id(), active_index()); | 1134 session_service->SetSelectedTabInWindow(session_id(), active_index()); |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH); | 1137 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH); |
| 1138 } | 1138 } |
| 1139 | 1139 |
| 1140 void Browser::TabMoved(TabContents* contents, | 1140 void Browser::TabMoved(WebContents* contents, |
| 1141 int from_index, | 1141 int from_index, |
| 1142 int to_index) { | 1142 int to_index) { |
| 1143 DCHECK(from_index >= 0 && to_index >= 0); | 1143 DCHECK(from_index >= 0 && to_index >= 0); |
| 1144 // Notify the history service. | 1144 // Notify the history service. |
| 1145 SyncHistoryWithTabs(std::min(from_index, to_index)); | 1145 SyncHistoryWithTabs(std::min(from_index, to_index)); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 void Browser::TabReplacedAt(TabStripModel* tab_strip_model, | 1148 void Browser::TabReplacedAt(TabStripModel* tab_strip_model, |
| 1149 TabContents* old_contents, | 1149 TabContents* old_contents, |
| 1150 TabContents* new_contents, | 1150 TabContents* new_contents, |
| (...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2345 if (contents && !allow_js_access) { | 2345 if (contents && !allow_js_access) { |
| 2346 contents->web_contents()->GetController().LoadURL( | 2346 contents->web_contents()->GetController().LoadURL( |
| 2347 target_url, | 2347 target_url, |
| 2348 content::Referrer(), | 2348 content::Referrer(), |
| 2349 content::PAGE_TRANSITION_LINK, | 2349 content::PAGE_TRANSITION_LINK, |
| 2350 std::string()); // No extra headers. | 2350 std::string()); // No extra headers. |
| 2351 } | 2351 } |
| 2352 | 2352 |
| 2353 return contents != NULL; | 2353 return contents != NULL; |
| 2354 } | 2354 } |
| OLD | NEW |