Chromium Code Reviews| 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 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2248 } | 2248 } |
| 2249 | 2249 |
| 2250 bool ExtensionService::ExtensionBindingsAllowed(const GURL& url) { | 2250 bool ExtensionService::ExtensionBindingsAllowed(const GURL& url) { |
| 2251 // Allow bindings for all packaged extensions and component hosted apps. | 2251 // Allow bindings for all packaged extensions and component hosted apps. |
| 2252 const Extension* extension = extensions_.GetExtensionOrAppByURL( | 2252 const Extension* extension = extensions_.GetExtensionOrAppByURL( |
| 2253 ExtensionURLInfo(url)); | 2253 ExtensionURLInfo(url)); |
| 2254 return extension && (!extension->is_hosted_app() || | 2254 return extension && (!extension->is_hosted_app() || |
| 2255 extension->location() == Extension::COMPONENT); | 2255 extension->location() == Extension::COMPONENT); |
| 2256 } | 2256 } |
| 2257 | 2257 |
| 2258 const SkBitmap& ExtensionService::GetOmniboxIcon( | 2258 gfx::Image ExtensionService::GetOmniboxIcon( |
| 2259 const std::string& extension_id) { | 2259 const std::string& extension_id) { |
| 2260 return omnibox_icon_manager_.GetIcon(extension_id); | 2260 return gfx::Image(omnibox_icon_manager_.GetIcon(extension_id)); |
|
sky
2012/08/20 15:15:51
Can GetIcon return a gfx::Image?
pkotwicz
2012/08/20 15:52:48
That's a good idea. However doing this is not supe
| |
| 2261 } | 2261 } |
| 2262 | 2262 |
| 2263 const SkBitmap& ExtensionService::GetOmniboxPopupIcon( | 2263 gfx::Image ExtensionService::GetOmniboxPopupIcon( |
| 2264 const std::string& extension_id) { | 2264 const std::string& extension_id) { |
| 2265 return omnibox_popup_icon_manager_.GetIcon(extension_id); | 2265 return gfx::Image(omnibox_popup_icon_manager_.GetIcon(extension_id)); |
| 2266 } | 2266 } |
| 2267 | 2267 |
| 2268 bool ExtensionService::OnExternalExtensionFileFound( | 2268 bool ExtensionService::OnExternalExtensionFileFound( |
| 2269 const std::string& id, | 2269 const std::string& id, |
| 2270 const Version* version, | 2270 const Version* version, |
| 2271 const FilePath& path, | 2271 const FilePath& path, |
| 2272 Extension::Location location, | 2272 Extension::Location location, |
| 2273 int creation_flags, | 2273 int creation_flags, |
| 2274 bool mark_acknowledged) { | 2274 bool mark_acknowledged) { |
| 2275 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2275 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2568 | 2568 |
| 2569 ExtensionService::NaClModuleInfoList::iterator | 2569 ExtensionService::NaClModuleInfoList::iterator |
| 2570 ExtensionService::FindNaClModule(const GURL& url) { | 2570 ExtensionService::FindNaClModule(const GURL& url) { |
| 2571 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2571 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2572 iter != nacl_module_list_.end(); ++iter) { | 2572 iter != nacl_module_list_.end(); ++iter) { |
| 2573 if (iter->url == url) | 2573 if (iter->url == url) |
| 2574 return iter; | 2574 return iter; |
| 2575 } | 2575 } |
| 2576 return nacl_module_list_.end(); | 2576 return nacl_module_list_.end(); |
| 2577 } | 2577 } |
| OLD | NEW |