OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extensions/launch_util.h" | 5 #include "chrome/browser/extensions/launch_util.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/extension_sync_service.h" | 8 #include "chrome/browser/extensions/extension_sync_service.h" |
9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/ui/host_desktop.h" | 11 #include "chrome/browser/ui/host_desktop.h" |
12 #include "chrome/common/extensions/extension_constants.h" | 12 #include "chrome/common/extensions/extension_constants.h" |
13 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 13 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
14 #include "components/pref_registry/pref_registry_syncable.h" | 14 #include "components/pref_registry/pref_registry_syncable.h" |
15 #include "extensions/browser/extension_prefs.h" | 15 #include "extensions/browser/extension_prefs.h" |
16 #include "extensions/browser/extension_registry.h" | 16 #include "extensions/browser/extension_registry.h" |
17 #include "extensions/browser/pref_names.h" | 17 #include "extensions/browser/pref_names.h" |
18 #include "extensions/common/extension.h" | 18 #include "extensions/common/extension.h" |
| 19 #include "ui/gfx/host_desktop_type.h" |
19 | 20 |
20 #if defined(USE_ASH) | 21 #if defined(USE_ASH) |
21 #include "ash/shell.h" | 22 #include "ash/shell.h" |
22 #endif | 23 #endif |
23 | 24 |
24 namespace extensions { | 25 namespace extensions { |
25 namespace { | 26 namespace { |
26 | 27 |
27 // A preference set by the the NTP to persist the desired launch container type | 28 // A preference set by the the NTP to persist the desired launch container type |
28 // used for apps. | 29 // used for apps. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 prefs->ReadPrefAsInteger(extension->id(), kPrefLaunchType, &value); | 156 prefs->ReadPrefAsInteger(extension->id(), kPrefLaunchType, &value); |
156 } | 157 } |
157 | 158 |
158 bool LaunchesInWindow(content::BrowserContext* context, | 159 bool LaunchesInWindow(content::BrowserContext* context, |
159 const Extension* extension) { | 160 const Extension* extension) { |
160 return GetLaunchType(ExtensionPrefs::Get(context), extension) == | 161 return GetLaunchType(ExtensionPrefs::Get(context), extension) == |
161 LAUNCH_TYPE_WINDOW; | 162 LAUNCH_TYPE_WINDOW; |
162 } | 163 } |
163 | 164 |
164 } // namespace extensions | 165 } // namespace extensions |
OLD | NEW |