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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 | 83 |
84 #if !defined(OS_MACOSX) | 84 #if !defined(OS_MACOSX) |
85 // Open as window is currently disabled on Mac. | 85 // Open as window is currently disabled on Mac. |
86 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_WINDOW); | 86 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_WINDOW); |
87 | |
88 if (!delegate->IsNewBookmarkAppsEnabled()) { | |
benwells
2015/08/18 06:32:07
Why is this code being deleted? It only affects no
dominickn
2015/08/18 06:53:00
Done, had the mistaken thought that pinned and ful
| |
89 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_PINNED_TAB); | |
90 launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_FULL_SCREEN); | |
91 } | |
92 #endif | 87 #endif |
93 return launch_type_list; | 88 return launch_type_list; |
94 } | 89 } |
95 | 90 |
96 scoped_ptr<management::ExtensionInfo> CreateExtensionInfo( | 91 scoped_ptr<management::ExtensionInfo> CreateExtensionInfo( |
97 const Extension& extension, | 92 const Extension& extension, |
98 content::BrowserContext* context) { | 93 content::BrowserContext* context) { |
99 ExtensionSystem* system = ExtensionSystem::Get(context); | 94 ExtensionSystem* system = ExtensionSystem::Get(context); |
100 ExtensionRegistry* registry = ExtensionRegistry::Get(context); | 95 ExtensionRegistry* registry = ExtensionRegistry::Get(context); |
101 const ManagementAPIDelegate* delegate = | 96 const ManagementAPIDelegate* delegate = |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
910 ManagementAPI::GetFactoryInstance() { | 905 ManagementAPI::GetFactoryInstance() { |
911 return g_factory.Pointer(); | 906 return g_factory.Pointer(); |
912 } | 907 } |
913 | 908 |
914 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { | 909 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { |
915 management_event_router_.reset(new ManagementEventRouter(browser_context_)); | 910 management_event_router_.reset(new ManagementEventRouter(browser_context_)); |
916 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 911 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
917 } | 912 } |
918 | 913 |
919 } // namespace extensions | 914 } // namespace extensions |
OLD | NEW |