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

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

Issue 210013: Making BrowserFocusTest FocusTraversal faster (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/browser.h ('k') | chrome/browser/browser_focus_uitest.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/idle_timer.h" 10 #include "base/idle_timer.h"
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 } 1993 }
1994 1994
1995 void Browser::ContentsZoomChange(bool zoom_in) { 1995 void Browser::ContentsZoomChange(bool zoom_in) {
1996 ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS); 1996 ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS);
1997 } 1997 }
1998 1998
1999 void Browser::TabContentsFocused(TabContents* tab_content) { 1999 void Browser::TabContentsFocused(TabContents* tab_content) {
2000 window_->TabContentsFocused(tab_content); 2000 window_->TabContentsFocused(tab_content);
2001 } 2001 }
2002 2002
2003 bool Browser::TakeFocus(bool reverse) {
2004 NotificationService::current()->Notify(
2005 NotificationType::FOCUS_RETURNED_TO_BROWSER,
2006 Source<Browser>(this),
2007 NotificationService::NoDetails());
2008 return false;
2009 }
2010
2003 bool Browser::IsApplication() const { 2011 bool Browser::IsApplication() const {
2004 return (type_ & TYPE_APP) != 0; 2012 return (type_ & TYPE_APP) != 0;
2005 } 2013 }
2006 2014
2007 void Browser::ConvertContentsToApplication(TabContents* contents) { 2015 void Browser::ConvertContentsToApplication(TabContents* contents) {
2008 const GURL& url = contents->controller().GetActiveEntry()->url(); 2016 const GURL& url = contents->controller().GetActiveEntry()->url();
2009 std::wstring app_name = ComputeApplicationNameFromURL(url); 2017 std::wstring app_name = ComputeApplicationNameFromURL(url);
2010 RegisterAppPrefs(app_name); 2018 RegisterAppPrefs(app_name);
2011 2019
2012 DetachContents(contents); 2020 DetachContents(contents);
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2930 /////////////////////////////////////////////////////////////////////////////// 2938 ///////////////////////////////////////////////////////////////////////////////
2931 // BrowserToolbarModel (private): 2939 // BrowserToolbarModel (private):
2932 2940
2933 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2941 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2934 // This |current_tab| can be NULL during the initialization of the 2942 // This |current_tab| can be NULL during the initialization of the
2935 // toolbar during window creation (i.e. before any tabs have been added 2943 // toolbar during window creation (i.e. before any tabs have been added
2936 // to the window). 2944 // to the window).
2937 TabContents* current_tab = browser_->GetSelectedTabContents(); 2945 TabContents* current_tab = browser_->GetSelectedTabContents();
2938 return current_tab ? &current_tab->controller() : NULL; 2946 return current_tab ? &current_tab->controller() : NULL;
2939 } 2947 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698