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

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

Issue 310913002: Issue 32919: Update the Zoom NSMenuItems (Zoom-In/Zoom-out/Actual-Size) when the zoom state changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploading a clean patch after rebase Created 6 years, 4 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
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 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 } 1890 }
1891 1891
1892 /////////////////////////////////////////////////////////////////////////////// 1892 ///////////////////////////////////////////////////////////////////////////////
1893 // Browser, ZoomObserver implementation: 1893 // Browser, ZoomObserver implementation:
1894 1894
1895 void Browser::OnZoomChanged(const ZoomController::ZoomChangedEventData& data) { 1895 void Browser::OnZoomChanged(const ZoomController::ZoomChangedEventData& data) {
1896 if (data.web_contents == tab_strip_model_->GetActiveWebContents()) { 1896 if (data.web_contents == tab_strip_model_->GetActiveWebContents()) {
1897 // Only show the zoom bubble for zoom changes in the active window. 1897 // Only show the zoom bubble for zoom changes in the active window.
1898 window_->ZoomChangedForActiveTab(data.can_show_bubble && 1898 window_->ZoomChangedForActiveTab(data.can_show_bubble &&
1899 window_->IsActive()); 1899 window_->IsActive());
1900 // Change the zoom commands state based on the zoom state
1901 command_controller_->ZoomStateChanged();
1900 } 1902 }
1901 } 1903 }
1902 1904
1903 /////////////////////////////////////////////////////////////////////////////// 1905 ///////////////////////////////////////////////////////////////////////////////
1904 // Browser, ui::SelectFileDialog::Listener implementation: 1906 // Browser, ui::SelectFileDialog::Listener implementation:
1905 1907
1906 void Browser::FileSelected(const base::FilePath& path, int index, 1908 void Browser::FileSelected(const base::FilePath& path, int index,
1907 void* params) { 1909 void* params) {
1908 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params); 1910 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params);
1909 } 1911 }
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2472 if (contents && !allow_js_access) { 2474 if (contents && !allow_js_access) {
2473 contents->web_contents()->GetController().LoadURL( 2475 contents->web_contents()->GetController().LoadURL(
2474 target_url, 2476 target_url,
2475 content::Referrer(), 2477 content::Referrer(),
2476 content::PAGE_TRANSITION_LINK, 2478 content::PAGE_TRANSITION_LINK,
2477 std::string()); // No extra headers. 2479 std::string()); // No extra headers.
2478 } 2480 }
2479 2481
2480 return contents != NULL; 2482 return contents != NULL;
2481 } 2483 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698