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_OBJECT_BACKED_NATIVE_HANDLER_H_ | 5 #ifndef EXTENSIONS_RENDERER_OBJECT_BACKED_NATIVE_HANDLER_H_ |
6 #define EXTENSIONS_RENDERER_OBJECT_BACKED_NATIVE_HANDLER_H_ | 6 #define EXTENSIONS_RENDERER_OBJECT_BACKED_NATIVE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/macros.h" |
12 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
13 #include "extensions/renderer/native_handler.h" | 14 #include "extensions/renderer/native_handler.h" |
14 #include "v8/include/v8-util.h" | 15 #include "v8/include/v8-util.h" |
15 #include "v8/include/v8.h" | 16 #include "v8/include/v8.h" |
16 | 17 |
17 namespace extensions { | 18 namespace extensions { |
18 class ScriptContext; | 19 class ScriptContext; |
19 | 20 |
20 // An ObjectBackedNativeHandler is a factory for JS objects with functions on | 21 // An ObjectBackedNativeHandler is a factory for JS objects with functions on |
21 // them that map to native C++ functions. Subclasses should call RouteFunction() | 22 // them that map to native C++ functions. Subclasses should call RouteFunction() |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 ScriptContext* context_; | 95 ScriptContext* context_; |
95 | 96 |
96 v8::Global<v8::ObjectTemplate> object_template_; | 97 v8::Global<v8::ObjectTemplate> object_template_; |
97 | 98 |
98 DISALLOW_COPY_AND_ASSIGN(ObjectBackedNativeHandler); | 99 DISALLOW_COPY_AND_ASSIGN(ObjectBackedNativeHandler); |
99 }; | 100 }; |
100 | 101 |
101 } // namespace extensions | 102 } // namespace extensions |
102 | 103 |
103 #endif // EXTENSIONS_RENDERER_OBJECT_BACKED_NATIVE_HANDLER_H_ | 104 #endif // EXTENSIONS_RENDERER_OBJECT_BACKED_NATIVE_HANDLER_H_ |
OLD | NEW |