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/extensions/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2259 } | 2259 } |
2260 | 2260 |
2261 bool ExtensionService::ExtensionBindingsAllowed(const GURL& url) { | 2261 bool ExtensionService::ExtensionBindingsAllowed(const GURL& url) { |
2262 // Allow bindings for all packaged extensions and component hosted apps. | 2262 // Allow bindings for all packaged extensions and component hosted apps. |
2263 const Extension* extension = extensions_.GetExtensionOrAppByURL( | 2263 const Extension* extension = extensions_.GetExtensionOrAppByURL( |
2264 ExtensionURLInfo(url)); | 2264 ExtensionURLInfo(url)); |
2265 return extension && (!extension->is_hosted_app() || | 2265 return extension && (!extension->is_hosted_app() || |
2266 extension->location() == Extension::COMPONENT); | 2266 extension->location() == Extension::COMPONENT); |
2267 } | 2267 } |
2268 | 2268 |
| 2269 bool ExtensionService::ShouldNotDisplayUrlInBrowserTab(const GURL& url) { |
| 2270 const Extension* extension = extensions_.GetExtensionOrAppByURL( |
| 2271 ExtensionURLInfo(url)); |
| 2272 return extension && extension->is_platform_app(); |
| 2273 } |
| 2274 |
2269 gfx::Image ExtensionService::GetOmniboxIcon( | 2275 gfx::Image ExtensionService::GetOmniboxIcon( |
2270 const std::string& extension_id) { | 2276 const std::string& extension_id) { |
2271 return gfx::Image(omnibox_icon_manager_.GetIcon(extension_id)); | 2277 return gfx::Image(omnibox_icon_manager_.GetIcon(extension_id)); |
2272 } | 2278 } |
2273 | 2279 |
2274 gfx::Image ExtensionService::GetOmniboxPopupIcon( | 2280 gfx::Image ExtensionService::GetOmniboxPopupIcon( |
2275 const std::string& extension_id) { | 2281 const std::string& extension_id) { |
2276 return gfx::Image(omnibox_popup_icon_manager_.GetIcon(extension_id)); | 2282 return gfx::Image(omnibox_popup_icon_manager_.GetIcon(extension_id)); |
2277 } | 2283 } |
2278 | 2284 |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2624 extensions::ExtensionHost* extension_host) { | 2630 extensions::ExtensionHost* extension_host) { |
2625 if (!extension_host) | 2631 if (!extension_host) |
2626 return; | 2632 return; |
2627 | 2633 |
2628 #if !defined(OS_ANDROID) | 2634 #if !defined(OS_ANDROID) |
2629 extensions::LaunchPlatformApp(extension_host->profile(), | 2635 extensions::LaunchPlatformApp(extension_host->profile(), |
2630 extension_host->extension(), | 2636 extension_host->extension(), |
2631 NULL, FilePath()); | 2637 NULL, FilePath()); |
2632 #endif | 2638 #endif |
2633 } | 2639 } |
OLD | NEW |