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

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

Issue 940673002: No need to suppress ZoomBubble if !window_->IsActive(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-apply fix test expectations. Created 5 years, 10 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 | chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm » ('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 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 if (web_contents == tab_strip_model_->GetActiveWebContents()) 1931 if (web_contents == tab_strip_model_->GetActiveWebContents())
1932 window_->SetStarredState(starred); 1932 window_->SetStarredState(starred);
1933 } 1933 }
1934 1934
1935 /////////////////////////////////////////////////////////////////////////////// 1935 ///////////////////////////////////////////////////////////////////////////////
1936 // Browser, ZoomObserver implementation: 1936 // Browser, ZoomObserver implementation:
1937 1937
1938 void Browser::OnZoomChanged( 1938 void Browser::OnZoomChanged(
1939 const ui_zoom::ZoomController::ZoomChangedEventData& data) { 1939 const ui_zoom::ZoomController::ZoomChangedEventData& data) {
1940 if (data.web_contents == tab_strip_model_->GetActiveWebContents()) { 1940 if (data.web_contents == tab_strip_model_->GetActiveWebContents()) {
1941 // Only show the zoom bubble for zoom changes in the active window. 1941 // Only show the zoom bubble for zoom changes in the active window.
rohitrao (ping after 24h) 2015/02/25 18:28:01 Is this comment now incorrect?
wjmaclean 2015/02/25 18:40:12 Ooops, yes ... I'll remove it.
1942 window_->ZoomChangedForActiveTab(data.can_show_bubble && 1942 window_->ZoomChangedForActiveTab(data.can_show_bubble);
rohitrao (ping after 24h) 2015/02/25 18:28:01 Is it still correct for this method to have "ForAc
wjmaclean 2015/02/25 18:40:12 I think so, though it is an unfortunate coincidenc
1943 window_->IsActive());
1944 // Change the zoom commands state based on the zoom state 1943 // Change the zoom commands state based on the zoom state
1945 command_controller_->ZoomStateChanged(); 1944 command_controller_->ZoomStateChanged();
1946 } 1945 }
1947 } 1946 }
1948 1947
1949 /////////////////////////////////////////////////////////////////////////////// 1948 ///////////////////////////////////////////////////////////////////////////////
1950 // Browser, ui::SelectFileDialog::Listener implementation: 1949 // Browser, ui::SelectFileDialog::Listener implementation:
1951 1950
1952 void Browser::FileSelected(const base::FilePath& path, int index, 1951 void Browser::FileSelected(const base::FilePath& path, int index,
1953 void* params) { 1952 void* params) {
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2540 if (contents && !allow_js_access) { 2539 if (contents && !allow_js_access) {
2541 contents->web_contents()->GetController().LoadURL( 2540 contents->web_contents()->GetController().LoadURL(
2542 target_url, 2541 target_url,
2543 content::Referrer(), 2542 content::Referrer(),
2544 ui::PAGE_TRANSITION_LINK, 2543 ui::PAGE_TRANSITION_LINK,
2545 std::string()); // No extra headers. 2544 std::string()); // No extra headers.
2546 } 2545 }
2547 2546
2548 return contents != NULL; 2547 return contents != NULL;
2549 } 2548 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698