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

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

Issue 373733003: Make sure WebContents passed to chrome_page_zoom::Zoom() have a ZoomController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r282074. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/ui/panels/panel_host.cc » ('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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 window_->SetStarredState(starred); 1839 window_->SetStarredState(starred);
1840 } 1840 }
1841 1841
1842 /////////////////////////////////////////////////////////////////////////////// 1842 ///////////////////////////////////////////////////////////////////////////////
1843 // Browser, ZoomObserver implementation: 1843 // Browser, ZoomObserver implementation:
1844 1844
1845 void Browser::OnZoomChanged(const ZoomController::ZoomChangedEventData& data) { 1845 void Browser::OnZoomChanged(const ZoomController::ZoomChangedEventData& data) {
1846 if (data.web_contents == tab_strip_model_->GetActiveWebContents()) { 1846 if (data.web_contents == tab_strip_model_->GetActiveWebContents()) {
1847 // Only show the zoom bubble for zoom changes in the active window. 1847 // Only show the zoom bubble for zoom changes in the active window.
1848 window_->ZoomChangedForActiveTab(data.can_show_bubble && 1848 window_->ZoomChangedForActiveTab(data.can_show_bubble &&
1849 window_->IsActive() && !is_devtools()); 1849 window_->IsActive());
1850 } 1850 }
1851 } 1851 }
1852 1852
1853 /////////////////////////////////////////////////////////////////////////////// 1853 ///////////////////////////////////////////////////////////////////////////////
1854 // Browser, ui::SelectFileDialog::Listener implementation: 1854 // Browser, ui::SelectFileDialog::Listener implementation:
1855 1855
1856 void Browser::FileSelected(const base::FilePath& path, int index, 1856 void Browser::FileSelected(const base::FilePath& path, int index,
1857 void* params) { 1857 void* params) {
1858 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params); 1858 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params);
1859 } 1859 }
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2422 if (contents && !allow_js_access) { 2422 if (contents && !allow_js_access) {
2423 contents->web_contents()->GetController().LoadURL( 2423 contents->web_contents()->GetController().LoadURL(
2424 target_url, 2424 target_url,
2425 content::Referrer(), 2425 content::Referrer(),
2426 content::PAGE_TRANSITION_LINK, 2426 content::PAGE_TRANSITION_LINK,
2427 std::string()); // No extra headers. 2427 std::string()); // No extra headers.
2428 } 2428 }
2429 2429
2430 return contents != NULL; 2430 return contents != NULL;
2431 } 2431 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/ui/panels/panel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698