OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/renderer/extensions/v8_schema_registry.h" | 5 #include "chrome/renderer/extensions/v8_schema_registry.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/renderer/extensions/chrome_v8_context.h" | 9 #include "chrome/renderer/extensions/chrome_v8_context.h" |
10 #include "chrome/renderer/extensions/object_backed_native_handler.h" | |
11 #include "content/public/renderer/v8_value_converter.h" | 10 #include "content/public/renderer/v8_value_converter.h" |
12 #include "extensions/common/extension_api.h" | 11 #include "extensions/common/extension_api.h" |
| 12 #include "extensions/renderer/object_backed_native_handler.h" |
13 | 13 |
14 using content::V8ValueConverter; | 14 using content::V8ValueConverter; |
15 | 15 |
16 namespace extensions { | 16 namespace extensions { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 class SchemaRegistryNativeHandler : public ObjectBackedNativeHandler { | 20 class SchemaRegistryNativeHandler : public ObjectBackedNativeHandler { |
21 public: | 21 public: |
22 SchemaRegistryNativeHandler(V8SchemaRegistry* registry, | 22 SchemaRegistryNativeHandler(V8SchemaRegistry* registry, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 if (context_.IsEmpty()) { | 105 if (context_.IsEmpty()) { |
106 v8::Handle<v8::Context> context = v8::Context::New(isolate); | 106 v8::Handle<v8::Context> context = v8::Context::New(isolate); |
107 context_.reset(context); | 107 context_.reset(context); |
108 schema_cache_.reset(new SchemaCache(isolate)); | 108 schema_cache_.reset(new SchemaCache(isolate)); |
109 return context; | 109 return context; |
110 } | 110 } |
111 return context_.NewHandle(isolate); | 111 return context_.NewHandle(isolate); |
112 } | 112 } |
113 | 113 |
114 } // namespace extensions | 114 } // namespace extensions |
OLD | NEW |