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

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

Issue 10700071: browser: Remove fullscreen functions and have callers call FullscreenController directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more includes Created 8 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
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/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 30 matching lines...) Expand all
41 #include "chrome/browser/sessions/session_service.h" 41 #include "chrome/browser/sessions/session_service.h"
42 #include "chrome/browser/sessions/session_service_factory.h" 42 #include "chrome/browser/sessions/session_service_factory.h"
43 #include "chrome/browser/shell_integration.h" 43 #include "chrome/browser/shell_integration.h"
44 #include "chrome/browser/ui/browser_finder.h" 44 #include "chrome/browser/ui/browser_finder.h"
45 #include "chrome/browser/ui/browser_list.h" 45 #include "chrome/browser/ui/browser_list.h"
46 #include "chrome/browser/ui/browser_navigator.h" 46 #include "chrome/browser/ui/browser_navigator.h"
47 #include "chrome/browser/ui/browser_tabrestore.h" 47 #include "chrome/browser/ui/browser_tabrestore.h"
48 #include "chrome/browser/ui/browser_tabstrip.h" 48 #include "chrome/browser/ui/browser_tabstrip.h"
49 #include "chrome/browser/ui/browser_window.h" 49 #include "chrome/browser/ui/browser_window.h"
50 #include "chrome/browser/ui/extensions/application_launch.h" 50 #include "chrome/browser/ui/extensions/application_launch.h"
51 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
51 #include "chrome/browser/ui/startup/autolaunch_prompt.h" 52 #include "chrome/browser/ui/startup/autolaunch_prompt.h"
52 #include "chrome/browser/ui/startup/bad_flags_prompt.h" 53 #include "chrome/browser/ui/startup/bad_flags_prompt.h"
53 #include "chrome/browser/ui/startup/default_browser_prompt.h" 54 #include "chrome/browser/ui/startup/default_browser_prompt.h"
54 #include "chrome/browser/ui/startup/obsolete_os_prompt.h" 55 #include "chrome/browser/ui/startup/obsolete_os_prompt.h"
55 #include "chrome/browser/ui/startup/session_crashed_prompt.h" 56 #include "chrome/browser/ui/startup/session_crashed_prompt.h"
56 #include "chrome/browser/ui/startup/startup_browser_creator.h" 57 #include "chrome/browser/ui/startup/startup_browser_creator.h"
57 #include "chrome/browser/ui/tab_contents/tab_contents.h" 58 #include "chrome/browser/ui/tab_contents/tab_contents.h"
58 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" 59 #include "chrome/browser/ui/tabs/pinned_tab_codec.h"
59 #include "chrome/browser/ui/tabs/tab_strip_model.h" 60 #include "chrome/browser/ui/tabs/tab_strip_model.h"
60 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" 61 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 #if defined(TOOLKIT_GTK) 673 #if defined(TOOLKIT_GTK)
673 // Setting the time of the last action on the window here allows us to steal 674 // Setting the time of the last action on the window here allows us to steal
674 // focus, which is what the user wants when opening a new tab in an existing 675 // focus, which is what the user wants when opening a new tab in an existing
675 // browser window. 676 // browser window.
676 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeWindow()); 677 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeWindow());
677 #endif 678 #endif
678 } 679 }
679 680
680 // In kiosk mode, we want to always be fullscreen, so switch to that now. 681 // In kiosk mode, we want to always be fullscreen, so switch to that now.
681 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) 682 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
682 browser->ToggleFullscreenMode(); 683 browser->fullscreen_controller()->ToggleFullscreenMode();
683 684
684 bool first_tab = true; 685 bool first_tab = true;
685 for (size_t i = 0; i < tabs.size(); ++i) { 686 for (size_t i = 0; i < tabs.size(); ++i) {
686 // We skip URLs that we'd have to launch an external protocol handler for. 687 // We skip URLs that we'd have to launch an external protocol handler for.
687 // This avoids us getting into an infinite loop asking ourselves to open 688 // This avoids us getting into an infinite loop asking ourselves to open
688 // a URL, should the handler be (incorrectly) configured to be us. Anyone 689 // a URL, should the handler be (incorrectly) configured to be us. Anyone
689 // asking us to open such a URL should really ask the handler directly. 690 // asking us to open such a URL should really ask the handler directly.
690 bool handled_by_chrome = ProfileIOData::IsHandledURL(tabs[i].url) || 691 bool handled_by_chrome = ProfileIOData::IsHandledURL(tabs[i].url) ||
691 (profile_ && profile_->GetProtocolHandlerRegistry()->IsHandledProtocol( 692 (profile_ && profile_->GetProtocolHandlerRegistry()->IsHandledProtocol(
692 tabs[i].url.scheme())); 693 tabs[i].url.scheme()));
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 // New: 861 // New:
861 prefs->GetString(prefs::kHomePage), 862 prefs->GetString(prefs::kHomePage),
862 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), 863 prefs->GetBoolean(prefs::kHomePageIsNewTabPage),
863 prefs->GetBoolean(prefs::kShowHomeButton), 864 prefs->GetBoolean(prefs::kShowHomeButton),
864 // Backup: 865 // Backup:
865 backup_homepage, 866 backup_homepage,
866 backup_homepage_is_ntp, 867 backup_homepage_is_ntp,
867 backup_show_home_button)); 868 backup_show_home_button));
868 } 869 }
869 } 870 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698