Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_ | 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_ |
| 6 #define EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_ | 6 #define EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 class ModuleSystem; | 22 class ModuleSystem; |
| 23 class ResourceBundleSourceMap; | 23 class ResourceBundleSourceMap; |
| 24 class ScriptContext; | 24 class ScriptContext; |
| 25 class URLPatternSet; | 25 class URLPatternSet; |
| 26 | 26 |
| 27 // Base class and default implementation for an extensions::Dispacher delegate. | 27 // Base class and default implementation for an extensions::Dispacher delegate. |
| 28 // DispatcherDelegate can be used to override and extend the behavior of the | 28 // DispatcherDelegate can be used to override and extend the behavior of the |
| 29 // extensions system's renderer side. | 29 // extensions system's renderer side. |
| 30 class DispatcherDelegate { | 30 class DispatcherDelegate { |
| 31 public: | 31 public: |
| 32 DispatcherDelegate(); | |
| 32 virtual ~DispatcherDelegate() {} | 33 virtual ~DispatcherDelegate() {} |
| 33 | 34 |
| 34 // Creates a new ScriptContext for a given v8 context. | 35 // Creates a new ScriptContext for a given v8 context. |
| 35 virtual scoped_ptr<ScriptContext> CreateScriptContext( | 36 virtual scoped_ptr<ScriptContext> CreateScriptContext( |
| 36 const v8::Handle<v8::Context>& v8_context, | 37 const v8::Handle<v8::Context>& v8_context, |
| 37 blink::WebFrame* frame, | 38 blink::WebFrame* frame, |
| 38 const Extension* extension, | 39 const Extension* extension, |
| 39 Feature::Context context_type, | 40 Feature::Context context_type, |
| 40 const Extension* effective_extension, | 41 const Extension* effective_extension, |
| 41 Feature::Context effective_context_type) = 0; | 42 Feature::Context effective_context_type) = 0; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 // See http://crbug.com/368431. | 80 // See http://crbug.com/368431. |
| 80 virtual void UpdateTabSpecificPermissions( | 81 virtual void UpdateTabSpecificPermissions( |
| 81 const extensions::Dispatcher* dispatcher, | 82 const extensions::Dispatcher* dispatcher, |
| 82 const GURL& url, | 83 const GURL& url, |
| 83 int tab_id, | 84 int tab_id, |
| 84 const std::string& extension_id, | 85 const std::string& extension_id, |
| 85 const extensions::URLPatternSet& origin_set) {} | 86 const extensions::URLPatternSet& origin_set) {} |
| 86 | 87 |
| 87 // Allows the delegate to respond to reports from the browser about WebRequest | 88 // Allows the delegate to respond to reports from the browser about WebRequest |
| 88 // API usage from within this process. | 89 // API usage from within this process. |
| 89 virtual void HandleWebRequestAPIUsage(bool webrequest_used) {} | 90 virtual void HandleWebRequestAPIUsage(bool webrequest_used); |
|
Ken Rockot(use gerrit already)
2014/09/22 21:44:54
You can completely get rid of this function in Dis
Xi Han
2014/09/23 14:03:55
Done.
| |
| 91 | |
| 92 bool webrequest_used() const { return webrequest_used_; } | |
| 93 | |
| 94 private: | |
| 95 // Status of webrequest usage. | |
| 96 bool webrequest_used_; | |
| 90 }; | 97 }; |
| 91 | 98 |
| 92 } // namespace extensions | 99 } // namespace extensions |
| 93 | 100 |
| 94 #endif // EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_ | 101 #endif // EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_ |
| OLD | NEW |