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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1008 "Tabs.Discard.ReloadCount", ++reload_count, 1, 1000, 50); | 1008 "Tabs.Discard.ReloadCount", ++reload_count, 1, 1000, 50); |
1009 chrome::Reload(this, CURRENT_TAB); | 1009 chrome::Reload(this, CURRENT_TAB); |
1010 } | 1010 } |
1011 | 1011 |
1012 // If we have any update pending, do it now. | 1012 // If we have any update pending, do it now. |
1013 if (chrome_updater_factory_.HasWeakPtrs() && old_contents) | 1013 if (chrome_updater_factory_.HasWeakPtrs() && old_contents) |
1014 ProcessPendingUIUpdates(); | 1014 ProcessPendingUIUpdates(); |
1015 | 1015 |
1016 // Propagate the profile to the location bar. | 1016 // Propagate the profile to the location bar. |
1017 UpdateToolbar((reason & CHANGE_REASON_REPLACED) == 0); | 1017 UpdateToolbar((reason & CHANGE_REASON_REPLACED) == 0); |
1018 window_->CloseTranslateBubble(); | |
Peter Kasting
2014/11/19 09:18:12
Why do we need a special call for this? Why can't
hajimehoshi
2014/11/19 10:02:08
Ah, you're right. Done.
| |
1018 | 1019 |
1019 if (chrome::IsInstantExtendedAPIEnabled()) | 1020 if (chrome::IsInstantExtendedAPIEnabled()) |
1020 search_delegate_->OnTabActivated(new_contents); | 1021 search_delegate_->OnTabActivated(new_contents); |
1021 | 1022 |
1022 // Update reload/stop state. | 1023 // Update reload/stop state. |
1023 command_controller_->LoadingStateChanged(new_contents->IsLoading(), true); | 1024 command_controller_->LoadingStateChanged(new_contents->IsLoading(), true); |
1024 | 1025 |
1025 // Update commands to reflect current state. | 1026 // Update commands to reflect current state. |
1026 command_controller_->TabStateChanged(); | 1027 command_controller_->TabStateChanged(); |
1027 | 1028 |
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2497 if (contents && !allow_js_access) { | 2498 if (contents && !allow_js_access) { |
2498 contents->web_contents()->GetController().LoadURL( | 2499 contents->web_contents()->GetController().LoadURL( |
2499 target_url, | 2500 target_url, |
2500 content::Referrer(), | 2501 content::Referrer(), |
2501 ui::PAGE_TRANSITION_LINK, | 2502 ui::PAGE_TRANSITION_LINK, |
2502 std::string()); // No extra headers. | 2503 std::string()); // No extra headers. |
2503 } | 2504 } |
2504 | 2505 |
2505 return contents != NULL; | 2506 return contents != NULL; |
2506 } | 2507 } |
OLD | NEW |