Chromium Code Reviews| Index: extensions/renderer/script_context.h |
| diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h |
| index 197ed3a180b213ec5264e5022c6d4704934bc609..7fb7694295066be286743b7fbe570be48b281078 100644 |
| --- a/extensions/renderer/script_context.h |
| +++ b/extensions/renderer/script_context.h |
| @@ -33,6 +33,7 @@ class RenderFrame; |
| } |
| namespace extensions { |
| +enum class CheckAliasStatus; |
| class Extension; |
| // Extensions wrapper for a v8::Context. |
| @@ -126,6 +127,11 @@ class ScriptContext : public RequestSender::Source { |
| // Returns the availability of the API |api_name|. |
| Feature::Availability GetAvailability(const std::string& api_name); |
| + // Returns the availability of the API |api_name|. |
| + // |alias_status| Whether API that has an alias that is available should be |
|
Devlin
2016/11/17 01:11:15
I think |alias_status| is self-explanatory without
tbarzic
2016/11/17 18:12:13
I'm not that certain it is. Without the context, i
|
| + // considered available (even if the API itself is not available). |
| + Feature::Availability GetAvailability(const std::string& api_name, |
| + CheckAliasStatus alias_status); |
|
Devlin
2016/11/17 01:11:15
maybe s/alias_status/check_alias?
tbarzic
2016/11/17 18:12:13
Done.
|
| // Returns a string description of the type of context this is. |
| std::string GetContextTypeDescription() const; |
| @@ -152,10 +158,12 @@ class ScriptContext : public RequestSender::Source { |
| // TODO(kalman): Make this a constructor parameter (as an origin). |
| void set_url(const GURL& url) { url_ = url; } |
| - // Returns whether the API |api| or any part of the API could be |
| - // available in this context without taking into account the context's |
| - // extension. |
| - bool IsAnyFeatureAvailableToContext(const extensions::Feature& api); |
| + // Returns whether the API |api| or any part of the API could be available in |
| + // this context without taking into account the context's extension. |
| + // |alias_status| Whether the API should be considered available if it has an |
| + // alias that is available. |
| + bool IsAnyFeatureAvailableToContext(const extensions::Feature& api, |
| + CheckAliasStatus alias_status); |
| // Utility to get the URL we will match against for a frame. If the frame has |
| // committed, this is the commited URL. Otherwise it is the provisional URL. |