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

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

Issue 7484029: Implemented kiosk mode for Mac. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase from trunk 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
« no previous file with comments | « chrome/browser/ui/fullscreen_controller.cc ('k') | chrome/common/chrome_switches.h » ('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/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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 browser = Browser::Create(profile_); 667 browser = Browser::Create(profile_);
668 } else { 668 } else {
669 #if defined(TOOLKIT_GTK) 669 #if defined(TOOLKIT_GTK)
670 // Setting the time of the last action on the window here allows us to steal 670 // Setting the time of the last action on the window here allows us to steal
671 // focus, which is what the user wants when opening a new tab in an existing 671 // focus, which is what the user wants when opening a new tab in an existing
672 // browser window. 672 // browser window.
673 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeWindow()); 673 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeWindow());
674 #endif 674 #endif
675 } 675 }
676 676
677 #if !defined(OS_MACOSX)
678 // In kiosk mode, we want to always be fullscreen, so switch to that now. 677 // In kiosk mode, we want to always be fullscreen, so switch to that now.
679 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) 678 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
680 browser->ToggleFullscreenMode(); 679 browser->ToggleFullscreenMode();
681 #endif
682 680
683 bool first_tab = true; 681 bool first_tab = true;
684 for (size_t i = 0; i < tabs.size(); ++i) { 682 for (size_t i = 0; i < tabs.size(); ++i) {
685 // We skip URLs that we'd have to launch an external protocol handler for. 683 // We skip URLs that we'd have to launch an external protocol handler for.
686 // This avoids us getting into an infinite loop asking ourselves to open 684 // This avoids us getting into an infinite loop asking ourselves to open
687 // a URL, should the handler be (incorrectly) configured to be us. Anyone 685 // a URL, should the handler be (incorrectly) configured to be us. Anyone
688 // asking us to open such a URL should really ask the handler directly. 686 // asking us to open such a URL should really ask the handler directly.
689 bool handled_by_chrome = ProfileIOData::IsHandledURL(tabs[i].url) || 687 bool handled_by_chrome = ProfileIOData::IsHandledURL(tabs[i].url) ||
690 (profile_ && profile_->GetProtocolHandlerRegistry()->IsHandledProtocol( 688 (profile_ && profile_->GetProtocolHandlerRegistry()->IsHandledProtocol(
691 tabs[i].url.scheme())); 689 tabs[i].url.scheme()));
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 // New: 858 // New:
861 prefs->GetString(prefs::kHomePage), 859 prefs->GetString(prefs::kHomePage),
862 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), 860 prefs->GetBoolean(prefs::kHomePageIsNewTabPage),
863 prefs->GetBoolean(prefs::kShowHomeButton), 861 prefs->GetBoolean(prefs::kShowHomeButton),
864 // Backup: 862 // Backup:
865 backup_homepage, 863 backup_homepage,
866 backup_homepage_is_ntp, 864 backup_homepage_is_ntp,
867 backup_show_home_button)); 865 backup_show_home_button));
868 } 866 }
869 } 867 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/fullscreen_controller.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698