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/extensions/application_launch.h" | 5 #include "chrome/browser/ui/extensions/application_launch.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "chrome/browser/extensions/default_apps_trial.h" | 10 #include "chrome/browser/extensions/default_apps_trial.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 36 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
37 #endif | 37 #endif |
38 | 38 |
39 #if defined(USE_ASH) | 39 #if defined(USE_ASH) |
40 #include "ash/ash_switches.h" | 40 #include "ash/ash_switches.h" |
41 #include "chrome/browser/ui/views/ash/panel_view_aura.h" | 41 #include "chrome/browser/ui/views/ash/panel_view_aura.h" |
42 #endif | 42 #endif |
43 | 43 |
44 using content::WebContents; | 44 using content::WebContents; |
45 using extensions::Extension; | 45 using extensions::Extension; |
| 46 using extensions::ExtensionPrefs; |
46 | 47 |
47 namespace { | 48 namespace { |
48 | 49 |
49 // Get the launch URL for a given extension, with optional override/fallback. | 50 // Get the launch URL for a given extension, with optional override/fallback. |
50 // |override_url|, if non-empty, will be preferred over the extension's | 51 // |override_url|, if non-empty, will be preferred over the extension's |
51 // launch url. | 52 // launch url. |
52 GURL UrlForExtension(const Extension* extension, | 53 GURL UrlForExtension(const Extension* extension, |
53 const GURL& override_url) { | 54 const GURL& override_url) { |
54 if (!extension) | 55 if (!extension) |
55 return override_url; | 56 return override_url; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 if (launch_type == ExtensionPrefs::LAUNCH_FULLSCREEN && | 346 if (launch_type == ExtensionPrefs::LAUNCH_FULLSCREEN && |
346 !browser->window()->IsFullscreen()) { | 347 !browser->window()->IsFullscreen()) { |
347 chrome::ToggleFullscreenMode(browser); | 348 chrome::ToggleFullscreenMode(browser); |
348 } | 349 } |
349 #endif | 350 #endif |
350 | 351 |
351 return contents; | 352 return contents; |
352 } | 353 } |
353 | 354 |
354 } // namespace application_launch | 355 } // namespace application_launch |
OLD | NEW |