Chromium Code Reviews| Index: chrome/renderer/extensions/chrome_v8_context.cc |
| diff --git a/chrome/renderer/extensions/chrome_v8_context.cc b/chrome/renderer/extensions/chrome_v8_context.cc |
| index fb1edd7ed51b964392796a48a78cb35c1d20869c..547b084dd322c0170f40dc129bf8f3f863691de5 100644 |
| --- a/chrome/renderer/extensions/chrome_v8_context.cc |
| +++ b/chrome/renderer/extensions/chrome_v8_context.cc |
| @@ -12,6 +12,7 @@ |
| #include "chrome/common/extensions/api/extension_api.h" |
| #include "chrome/common/extensions/extension.h" |
| #include "chrome/common/extensions/extension_set.h" |
| +#include "chrome/common/extensions/features/base_feature_provider.h" |
| #include "chrome/renderer/extensions/chrome_v8_extension.h" |
| #include "chrome/renderer/extensions/module_system.h" |
| #include "chrome/renderer/extensions/user_script_slave.h" |
| @@ -152,22 +153,19 @@ bool ChromeV8Context::CallChromeHiddenMethod( |
| return true; |
| } |
| -Feature::Availability ChromeV8Context::GetAvailability( |
| - const std::string& api_name) { |
| - return GetAvailabilityInternal(api_name, extension_); |
| -} |
| - |
| Feature::Availability ChromeV8Context::GetAvailabilityForContext( |
| const std::string& api_name) { |
| - return GetAvailabilityInternal(api_name, NULL); |
| + return ExtensionAPI::GetSharedInstance()->IsPartAvailableToContext( |
|
not at google - send to devlin
2013/04/27 01:02:43
seems like this might be a dangerous oversimplific
cduvall
2013/05/01 02:51:47
Maybe it would be better to rename GetPossibleAvai
not at google - send to devlin
2013/05/01 20:47:04
Ah yeah good point. Something even more explicit p
cduvall
2013/05/01 23:47:10
Done.
|
| + api_name, |
| + context_type_, |
| + UserScriptSlave::GetDataSourceURLForFrame(web_frame_)); |
| } |
| -Feature::Availability ChromeV8Context::GetAvailabilityInternal( |
| - const std::string& api_name, |
| - const Extension* extension) { |
| +Feature::Availability ChromeV8Context::GetAvailability( |
| + const std::string& api_name) { |
| return ExtensionAPI::GetSharedInstance()->IsAvailable( |
| api_name, |
| - extension, |
| + extension_, |
| context_type_, |
| UserScriptSlave::GetDataSourceURLForFrame(web_frame_)); |
| } |