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

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

Issue 739793003: Close bubbles not on UpdateToolbar but when the activated tab is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_window.h » ('j') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698