OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 #endif | 369 #endif |
370 } | 370 } |
371 | 371 |
372 // In kiosk mode, we want to always be fullscreen, so switch to that now. | 372 // In kiosk mode, we want to always be fullscreen, so switch to that now. |
373 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode) || | 373 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode) || |
374 base::CommandLine::ForCurrentProcess()->HasSwitch( | 374 base::CommandLine::ForCurrentProcess()->HasSwitch( |
375 switches::kStartFullscreen)) { | 375 switches::kStartFullscreen)) { |
376 // It's possible for there to be no browser window, e.g. if someone | 376 // It's possible for there to be no browser window, e.g. if someone |
377 // specified a non-sensical combination of options | 377 // specified a non-sensical combination of options |
378 // ("--kiosk --no_startup_window"); do nothing in that case. | 378 // ("--kiosk --no_startup_window"); do nothing in that case. |
379 Browser* browser = BrowserList::GetInstance(desktop_type)->GetLastActive(); | 379 Browser* browser = BrowserList::GetInstance()->GetLastActive(); |
380 if (browser) | 380 if (browser) |
381 chrome::ToggleFullscreenMode(browser); | 381 chrome::ToggleFullscreenMode(browser); |
382 } | 382 } |
383 | 383 |
384 #if defined(OS_WIN) | 384 #if defined(OS_WIN) |
385 // TODO(gab): This could now run only during Active Setup (i.e. on explicit | 385 // TODO(gab): This could now run only during Active Setup (i.e. on explicit |
386 // Active Setup versioning and on OS upgrades) instead of every startup. | 386 // Active Setup versioning and on OS upgrades) instead of every startup. |
387 // http://crbug.com/577697 | 387 // http://crbug.com/577697 |
388 if (process_startup) | 388 if (process_startup) |
389 ShellIntegration::MigrateTaskbarPins(); | 389 ShellIntegration::MigrateTaskbarPins(); |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 #if defined(OS_WIN) | 999 #if defined(OS_WIN) |
1000 TriggeredProfileResetter* triggered_profile_resetter = | 1000 TriggeredProfileResetter* triggered_profile_resetter = |
1001 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 1001 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
1002 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 1002 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
1003 if (triggered_profile_resetter) { | 1003 if (triggered_profile_resetter) { |
1004 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1004 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
1005 } | 1005 } |
1006 #endif // defined(OS_WIN) | 1006 #endif // defined(OS_WIN) |
1007 return has_reset_trigger; | 1007 return has_reset_trigger; |
1008 } | 1008 } |
OLD | NEW |