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

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

Issue 10959054: Switch ZoomTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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/ui/browser.h ('k') | chrome/browser/ui/browser_adoption.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // OS_WIN 10 #endif // OS_WIN
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 1752
1753 void Browser::URLStarredChanged(content::WebContents* web_contents, 1753 void Browser::URLStarredChanged(content::WebContents* web_contents,
1754 bool starred) { 1754 bool starred) {
1755 if (web_contents == chrome::GetActiveWebContents(this)) 1755 if (web_contents == chrome::GetActiveWebContents(this))
1756 window_->SetStarredState(starred); 1756 window_->SetStarredState(starred);
1757 } 1757 }
1758 1758
1759 /////////////////////////////////////////////////////////////////////////////// 1759 ///////////////////////////////////////////////////////////////////////////////
1760 // Browser, ZoomObserver implementation: 1760 // Browser, ZoomObserver implementation:
1761 1761
1762 void Browser::OnZoomChanged(TabContents* source, bool can_show_bubble) { 1762 void Browser::OnZoomChanged(content::WebContents* source,
1763 if (source == chrome::GetActiveTabContents(this)) { 1763 bool can_show_bubble) {
1764 if (source == chrome::GetActiveWebContents(this)) {
1764 // Only show the zoom bubble for zoom changes in the active window. 1765 // Only show the zoom bubble for zoom changes in the active window.
1765 window_->ZoomChangedForActiveTab(can_show_bubble && window_->IsActive()); 1766 window_->ZoomChangedForActiveTab(can_show_bubble && window_->IsActive());
1766 } 1767 }
1767 } 1768 }
1768 1769
1769 /////////////////////////////////////////////////////////////////////////////// 1770 ///////////////////////////////////////////////////////////////////////////////
1770 // Browser, ui::SelectFileDialog::Listener implementation: 1771 // Browser, ui::SelectFileDialog::Listener implementation:
1771 1772
1772 void Browser::FileSelected(const FilePath& path, int index, void* params) { 1773 void Browser::FileSelected(const FilePath& path, int index, void* params) {
1773 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params); 1774 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params);
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 if (contents && !allow_js_access) { 2287 if (contents && !allow_js_access) {
2287 contents->web_contents()->GetController().LoadURL( 2288 contents->web_contents()->GetController().LoadURL(
2288 target_url, 2289 target_url,
2289 content::Referrer(), 2290 content::Referrer(),
2290 content::PAGE_TRANSITION_LINK, 2291 content::PAGE_TRANSITION_LINK,
2291 std::string()); // No extra headers. 2292 std::string()); // No extra headers.
2292 } 2293 }
2293 2294
2294 return contents != NULL; 2295 return contents != NULL;
2295 } 2296 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_adoption.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698