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

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: Show "An extension triggered full screen." when the extension's name is not available. 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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 // Setting the time of the last action on the window here allows us to steal 1185 // Setting the time of the last action on the window here allows us to steal
1186 // focus, which is what the user wants when opening a new tab in an existing 1186 // focus, which is what the user wants when opening a new tab in an existing
1187 // browser window. 1187 // browser window.
1188 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeHandle()); 1188 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeHandle());
1189 #endif 1189 #endif
1190 } 1190 }
1191 1191
1192 #if !defined(OS_MACOSX) 1192 #if !defined(OS_MACOSX)
1193 // In kiosk mode, we want to always be fullscreen, so switch to that now. 1193 // In kiosk mode, we want to always be fullscreen, so switch to that now.
1194 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) 1194 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
1195 browser->ToggleFullscreenMode(false); 1195 browser->ToggleFullscreenMode();
1196 #endif 1196 #endif
1197 1197
1198 for (size_t i = 0; i < tabs.size(); ++i) { 1198 for (size_t i = 0; i < tabs.size(); ++i) {
1199 // We skip URLs that we'd have to launch an external protocol handler for. 1199 // We skip URLs that we'd have to launch an external protocol handler for.
1200 // This avoids us getting into an infinite loop asking ourselves to open 1200 // This avoids us getting into an infinite loop asking ourselves to open
1201 // a URL, should the handler be (incorrectly) configured to be us. Anyone 1201 // a URL, should the handler be (incorrectly) configured to be us. Anyone
1202 // asking us to open such a URL should really ask the handler directly. 1202 // asking us to open such a URL should really ask the handler directly.
1203 bool handled_by_chrome = ProfileIOData::IsHandledURL(tabs[i].url) || 1203 bool handled_by_chrome = ProfileIOData::IsHandledURL(tabs[i].url) ||
1204 (profile_ && profile_->GetProtocolHandlerRegistry()->IsHandledProtocol( 1204 (profile_ && profile_->GetProtocolHandlerRegistry()->IsHandledProtocol(
1205 tabs[i].url.scheme())); 1205 tabs[i].url.scheme()));
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 1859
1860 Profile* profile = ProfileManager::GetLastUsedProfile(); 1860 Profile* profile = ProfileManager::GetLastUsedProfile();
1861 if (!profile) { 1861 if (!profile) {
1862 // We should only be able to get here if the profile already exists and 1862 // We should only be able to get here if the profile already exists and
1863 // has been created. 1863 // has been created.
1864 NOTREACHED(); 1864 NOTREACHED();
1865 return; 1865 return;
1866 } 1866 }
1867 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL); 1867 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL);
1868 } 1868 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698