| OLD | NEW |
| 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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 UMA_HISTOGRAM_CUSTOM_COUNTS( | 1038 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 1039 "Tabs.Discard.ReloadCount", ++reload_count, 1, 1000, 50); | 1039 "Tabs.Discard.ReloadCount", ++reload_count, 1, 1000, 50); |
| 1040 chrome::Reload(this, CURRENT_TAB); | 1040 chrome::Reload(this, CURRENT_TAB); |
| 1041 } | 1041 } |
| 1042 | 1042 |
| 1043 // If we have any update pending, do it now. | 1043 // If we have any update pending, do it now. |
| 1044 if (chrome_updater_factory_.HasWeakPtrs() && old_contents) | 1044 if (chrome_updater_factory_.HasWeakPtrs() && old_contents) |
| 1045 ProcessPendingUIUpdates(); | 1045 ProcessPendingUIUpdates(); |
| 1046 | 1046 |
| 1047 // Propagate the profile to the location bar. | 1047 // Propagate the profile to the location bar. |
| 1048 UpdateToolbar(true); | 1048 UpdateToolbar((reason & CHANGE_REASON_REPLACED) == 0); |
| 1049 | 1049 |
| 1050 // Propagate tab state to toolbar, tab-strip, etc. | 1050 // Propagate tab state to toolbar, tab-strip, etc. |
| 1051 UpdateSearchState(new_contents); | 1051 UpdateSearchState(new_contents); |
| 1052 | 1052 |
| 1053 // Update reload/stop state. | 1053 // Update reload/stop state. |
| 1054 command_controller_->LoadingStateChanged(new_contents->IsLoading(), true); | 1054 command_controller_->LoadingStateChanged(new_contents->IsLoading(), true); |
| 1055 | 1055 |
| 1056 // Update commands to reflect current state. | 1056 // Update commands to reflect current state. |
| 1057 command_controller_->TabStateChanged(); | 1057 command_controller_->TabStateChanged(); |
| 1058 | 1058 |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2234 if (contents && !allow_js_access) { | 2234 if (contents && !allow_js_access) { |
| 2235 contents->web_contents()->GetController().LoadURL( | 2235 contents->web_contents()->GetController().LoadURL( |
| 2236 target_url, | 2236 target_url, |
| 2237 content::Referrer(), | 2237 content::Referrer(), |
| 2238 content::PAGE_TRANSITION_LINK, | 2238 content::PAGE_TRANSITION_LINK, |
| 2239 std::string()); // No extra headers. | 2239 std::string()); // No extra headers. |
| 2240 } | 2240 } |
| 2241 | 2241 |
| 2242 return contents != NULL; | 2242 return contents != NULL; |
| 2243 } | 2243 } |
| OLD | NEW |