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

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

Issue 9353010: Add FullscreenController::ToggleFullscreenModeWithExtension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build Created 8 years, 10 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/browser_init.h" 5 #include "chrome/browser/ui/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 // Setting the time of the last action on the window here allows us to steal 1177 // Setting the time of the last action on the window here allows us to steal
1178 // focus, which is what the user wants when opening a new tab in an existing 1178 // focus, which is what the user wants when opening a new tab in an existing
1179 // browser window. 1179 // browser window.
1180 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeHandle()); 1180 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeHandle());
1181 #endif 1181 #endif
1182 } 1182 }
1183 1183
1184 #if !defined(OS_MACOSX) 1184 #if !defined(OS_MACOSX)
1185 // In kiosk mode, we want to always be fullscreen, so switch to that now. 1185 // In kiosk mode, we want to always be fullscreen, so switch to that now.
1186 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) 1186 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
1187 browser->ToggleFullscreenMode(false); 1187 browser->ToggleFullscreenMode();
1188 #endif 1188 #endif
1189 1189
1190 for (size_t i = 0; i < tabs.size(); ++i) { 1190 for (size_t i = 0; i < tabs.size(); ++i) {
1191 // We skip URLs that we'd have to launch an external protocol handler for. 1191 // We skip URLs that we'd have to launch an external protocol handler for.
1192 // This avoids us getting into an infinite loop asking ourselves to open 1192 // This avoids us getting into an infinite loop asking ourselves to open
1193 // a URL, should the handler be (incorrectly) configured to be us. Anyone 1193 // a URL, should the handler be (incorrectly) configured to be us. Anyone
1194 // asking us to open such a URL should really ask the handler directly. 1194 // asking us to open such a URL should really ask the handler directly.
1195 bool handled_by_chrome = ProfileIOData::IsHandledURL(tabs[i].url) || 1195 bool handled_by_chrome = ProfileIOData::IsHandledURL(tabs[i].url) ||
1196 (profile_ && profile_->GetProtocolHandlerRegistry()->IsHandledProtocol( 1196 (profile_ && profile_->GetProtocolHandlerRegistry()->IsHandledProtocol(
1197 tabs[i].url.scheme())); 1197 tabs[i].url.scheme()));
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 1830
1831 Profile* profile = ProfileManager::GetLastUsedProfile(); 1831 Profile* profile = ProfileManager::GetLastUsedProfile();
1832 if (!profile) { 1832 if (!profile) {
1833 // We should only be able to get here if the profile already exists and 1833 // We should only be able to get here if the profile already exists and
1834 // has been created. 1834 // has been created.
1835 NOTREACHED(); 1835 NOTREACHED();
1836 return; 1836 return;
1837 } 1837 }
1838 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL); 1838 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL);
1839 } 1839 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698