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

Unified Diff: extensions/renderer/test_v8_extension_configuration.h

Issue 2586303002: [Extensions Bindings] Pull out test resources (Closed)
Patch Set: comment Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/string_source_map.cc ('k') | extensions/renderer/test_v8_extension_configuration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/test_v8_extension_configuration.h
diff --git a/extensions/renderer/test_v8_extension_configuration.h b/extensions/renderer/test_v8_extension_configuration.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3f946a528742b6d834f2e9f070c74fed830bdb8
--- /dev/null
+++ b/extensions/renderer/test_v8_extension_configuration.h
@@ -0,0 +1,39 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_RENDERER_TEST_V8_EXTENSION_CONFIGURATION_H_
+#define EXTENSIONS_RENDERER_TEST_V8_EXTENSION_CONFIGURATION_H_
+
+#include <memory>
+#include <vector>
+
+#include "base/macros.h"
+
+namespace v8 {
+class Extension;
+class ExtensionConfiguration;
+}
+
+namespace extensions {
+
+// A test helper to allow for the instantiation of the SafeBuiltins
+// v8::Extension, which is needed by most/all of our custom bindings.
+class TestV8ExtensionConfiguration {
+ public:
+ TestV8ExtensionConfiguration();
+ ~TestV8ExtensionConfiguration();
+
+ static v8::ExtensionConfiguration* GetConfiguration();
+
+ private:
+ std::unique_ptr<v8::Extension> safe_builtins_;
+ std::vector<const char*> v8_extension_names_;
+ std::unique_ptr<v8::ExtensionConfiguration> v8_extension_configuration_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestV8ExtensionConfiguration);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_RENDERER_TEST_V8_EXTENSION_CONFIGURATION_H_
« no previous file with comments | « extensions/renderer/string_source_map.cc ('k') | extensions/renderer/test_v8_extension_configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698