Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: extensions/renderer/web_request_hooks.h

Issue 2947463002: [Extensions Bindings] Add a bindings/ subdirectory under renderer (Closed)
Patch Set: . Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/renderer/storage_area.cc ('k') | extensions/renderer/web_request_hooks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_WEB_REQUEST_HOOKS_H_ 5 #ifndef EXTENSIONS_RENDERER_WEB_REQUEST_HOOKS_H_
6 #define EXTENSIONS_RENDERER_WEB_REQUEST_HOOKS_H_ 6 #define EXTENSIONS_RENDERER_WEB_REQUEST_HOOKS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "extensions/renderer/api_binding_hooks_delegate.h" 11 #include "extensions/renderer/bindings/api_binding_hooks_delegate.h"
12 #include "extensions/renderer/api_binding_types.h" 12 #include "extensions/renderer/bindings/api_binding_types.h"
13 #include "v8/include/v8.h" 13 #include "v8/include/v8.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 // Custom hooks for the WebRequest API. 17 // Custom hooks for the WebRequest API.
18 class WebRequestHooks : public APIBindingHooksDelegate { 18 class WebRequestHooks : public APIBindingHooksDelegate {
19 public: 19 public:
20 WebRequestHooks(); 20 WebRequestHooks();
21 ~WebRequestHooks() override; 21 ~WebRequestHooks() override;
22 22
23 // APIBindingHooksDelegate: 23 // APIBindingHooksDelegate:
24 // Creates a new WebRequest event. 24 // Creates a new WebRequest event.
25 // TODO(devlin): WebRequest events are a very unfortunate implementation 25 // TODO(devlin): WebRequest events are a very unfortunate implementation
26 // detail, but refactoring means changing a few parts of the internal API. 26 // detail, but refactoring means changing a few parts of the internal API.
27 // It's not impossible, but it's a bit involved. However, as we move more 27 // It's not impossible, but it's a bit involved. However, as we move more
28 // towards native bindings, it's definitely something we'll want to do. 28 // towards native bindings, it's definitely something we'll want to do.
29 bool CreateCustomEvent(v8::Local<v8::Context> context, 29 bool CreateCustomEvent(v8::Local<v8::Context> context,
30 const binding::RunJSFunctionSync& run_js_sync, 30 const binding::RunJSFunctionSync& run_js_sync,
31 const std::string& event_name, 31 const std::string& event_name,
32 v8::Local<v8::Value>* event_out) override; 32 v8::Local<v8::Value>* event_out) override;
33 33
34 private: 34 private:
35 DISALLOW_COPY_AND_ASSIGN(WebRequestHooks); 35 DISALLOW_COPY_AND_ASSIGN(WebRequestHooks);
36 }; 36 };
37 37
38 } // namespace extensions 38 } // namespace extensions
39 39
40 #endif // EXTENSIONS_RENDERER_WEB_REQUEST_HOOKS_H_ 40 #endif // EXTENSIONS_RENDERER_WEB_REQUEST_HOOKS_H_
OLDNEW
« no previous file with comments | « extensions/renderer/storage_area.cc ('k') | extensions/renderer/web_request_hooks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698