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 "extensions/browser/api/management/management_api.h" | 5 #include "extensions/browser/api/management/management_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const ManagementAPIDelegate* delegate) { | 75 const ManagementAPIDelegate* delegate) { |
76 std::vector<management::LaunchType> launch_type_list; | 76 std::vector<management::LaunchType> launch_type_list; |
77 if (extension.is_platform_app()) { | 77 if (extension.is_platform_app()) { |
78 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_WINDOW); | 78 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_WINDOW); |
79 return launch_type_list; | 79 return launch_type_list; |
80 } | 80 } |
81 | 81 |
82 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_REGULAR_TAB); | 82 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_REGULAR_TAB); |
83 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_WINDOW); | 83 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_WINDOW); |
84 | 84 |
85 if (!delegate->IsStreamlinedHostedAppsEnabled()) { | 85 if (!delegate->IsNewBookmarkAppsEnabled()) { |
86 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_PINNED_TAB); | 86 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_PINNED_TAB); |
87 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_FULL_SCREEN); | 87 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_FULL_SCREEN); |
88 } | 88 } |
89 return launch_type_list; | 89 return launch_type_list; |
90 } | 90 } |
91 | 91 |
92 scoped_ptr<management::ExtensionInfo> CreateExtensionInfo( | 92 scoped_ptr<management::ExtensionInfo> CreateExtensionInfo( |
93 const Extension& extension, | 93 const Extension& extension, |
94 content::BrowserContext* context) { | 94 content::BrowserContext* context) { |
95 ExtensionSystem* system = ExtensionSystem::Get(context); | 95 ExtensionSystem* system = ExtensionSystem::Get(context); |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 ManagementAPI::GetFactoryInstance() { | 893 ManagementAPI::GetFactoryInstance() { |
894 return g_factory.Pointer(); | 894 return g_factory.Pointer(); |
895 } | 895 } |
896 | 896 |
897 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { | 897 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { |
898 management_event_router_.reset(new ManagementEventRouter(browser_context_)); | 898 management_event_router_.reset(new ManagementEventRouter(browser_context_)); |
899 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 899 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
900 } | 900 } |
901 | 901 |
902 } // namespace extensions | 902 } // namespace extensions |
OLD | NEW |