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 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1842 | 1842 |
1843 /////////////////////////////////////////////////////////////////////////////// | 1843 /////////////////////////////////////////////////////////////////////////////// |
1844 // Browser, ZoomObserver implementation: | 1844 // Browser, ZoomObserver implementation: |
1845 | 1845 |
1846 void Browser::OnZoomChanged(content::WebContents* source, | 1846 void Browser::OnZoomChanged(content::WebContents* source, |
1847 bool can_show_bubble) { | 1847 bool can_show_bubble) { |
1848 if (source == tab_strip_model_->GetActiveWebContents()) { | 1848 if (source == tab_strip_model_->GetActiveWebContents()) { |
1849 // Only show the zoom bubble for zoom changes in the active window. | 1849 // Only show the zoom bubble for zoom changes in the active window. |
1850 window_->ZoomChangedForActiveTab(can_show_bubble && window_->IsActive() && | 1850 window_->ZoomChangedForActiveTab(can_show_bubble && window_->IsActive() && |
1851 !is_devtools()); | 1851 !is_devtools()); |
| 1852 // Change the zoom menu item state once the zoom has changed |
| 1853 command_controller_->ZoomStateChanged(); |
1852 } | 1854 } |
1853 } | 1855 } |
1854 | 1856 |
1855 /////////////////////////////////////////////////////////////////////////////// | 1857 /////////////////////////////////////////////////////////////////////////////// |
1856 // Browser, ui::SelectFileDialog::Listener implementation: | 1858 // Browser, ui::SelectFileDialog::Listener implementation: |
1857 | 1859 |
1858 void Browser::FileSelected(const base::FilePath& path, int index, | 1860 void Browser::FileSelected(const base::FilePath& path, int index, |
1859 void* params) { | 1861 void* params) { |
1860 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params); | 1862 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params); |
1861 } | 1863 } |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2420 if (contents && !allow_js_access) { | 2422 if (contents && !allow_js_access) { |
2421 contents->web_contents()->GetController().LoadURL( | 2423 contents->web_contents()->GetController().LoadURL( |
2422 target_url, | 2424 target_url, |
2423 content::Referrer(), | 2425 content::Referrer(), |
2424 content::PAGE_TRANSITION_LINK, | 2426 content::PAGE_TRANSITION_LINK, |
2425 std::string()); // No extra headers. | 2427 std::string()); // No extra headers. |
2426 } | 2428 } |
2427 | 2429 |
2428 return contents != NULL; | 2430 return contents != NULL; |
2429 } | 2431 } |
OLD | NEW |