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

Unified Diff: content/shell/renderer/binding_helpers.h

Issue 1141993002: Inline binding_helpers.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/shell/renderer/ipc_echo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/binding_helpers.h
diff --git a/content/shell/renderer/binding_helpers.h b/content/shell/renderer/binding_helpers.h
deleted file mode 100644
index 738702151448b9835d6c71c9ad948989072b9a9b..0000000000000000000000000000000000000000
--- a/content/shell/renderer/binding_helpers.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2014 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 CONTENT_SHELL_RENDERER_BINDING_HELPERS_H_
-#define CONTENT_SHELL_RENDERER_BINDING_HELPERS_H_
-
-#include <string>
-#include <vector>
-
-#include "base/memory/scoped_ptr.h"
-#include "gin/handle.h"
-#include "gin/wrappable.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebKit.h"
-
-namespace content {
-
-template<class WrappedClass>
-void InstallAsWindowProperties(WrappedClass* wrapped,
- blink::WebFrame* frame,
- const std::vector<std::string>& names) {
- v8::Isolate* isolate = blink::mainThreadIsolate();
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = frame->mainWorldScriptContext();
- if (context.IsEmpty())
- return;
-
- v8::Context::Scope context_scope(context);
-
- gin::Handle<WrappedClass> bindings = gin::CreateHandle(isolate, wrapped);
- if (bindings.IsEmpty())
- return;
- v8::Local<v8::Object> global = context->Global();
- v8::Local<v8::Value> v8_bindings = bindings.ToV8();
- for (size_t i = 0; i < names.size(); ++i)
- global->Set(gin::StringToV8(isolate, names[i].c_str()), v8_bindings);
-}
-
-} // namespace content
-
-#endif // CONTENT_SHELL_RENDERER_BINDING_HELPERS_H_
« no previous file with comments | « no previous file | content/shell/renderer/ipc_echo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698