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

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-remove stale comment. Created 5 years, 9 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 window_->ZoomChangedForActiveTab(data.can_show_bubble);
1942 window_->ZoomChangedForActiveTab(data.can_show_bubble &&
1943 window_->IsActive());
1944 // Change the zoom commands state based on the zoom state 1942 // Change the zoom commands state based on the zoom state
1945 command_controller_->ZoomStateChanged(); 1943 command_controller_->ZoomStateChanged();
1946 } 1944 }
1947 } 1945 }
1948 1946
1949 /////////////////////////////////////////////////////////////////////////////// 1947 ///////////////////////////////////////////////////////////////////////////////
1950 // Browser, ui::SelectFileDialog::Listener implementation: 1948 // Browser, ui::SelectFileDialog::Listener implementation:
1951 1949
1952 void Browser::FileSelected(const base::FilePath& path, int index, 1950 void Browser::FileSelected(const base::FilePath& path, int index,
1953 void* params) { 1951 void* params) {
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2540 if (contents && !allow_js_access) { 2538 if (contents && !allow_js_access) {
2541 contents->web_contents()->GetController().LoadURL( 2539 contents->web_contents()->GetController().LoadURL(
2542 target_url, 2540 target_url,
2543 content::Referrer(), 2541 content::Referrer(),
2544 ui::PAGE_TRANSITION_LINK, 2542 ui::PAGE_TRANSITION_LINK,
2545 std::string()); // No extra headers. 2543 std::string()); // No extra headers.
2546 } 2544 }
2547 2545
2548 return contents != NULL; 2546 return contents != NULL;
2549 } 2547 }
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