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

Unified Diff: content/renderer/web_ui_runner.cc

Issue 1468903002: Rename some WebUI Mojo concepts to be more generic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « content/renderer/web_ui_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/web_ui_runner.cc
diff --git a/content/renderer/web_ui_runner.cc b/content/renderer/web_ui_runner.cc
deleted file mode 100644
index f1d0cce17c19beda4141e41dab4c3b1614b0e02e..0000000000000000000000000000000000000000
--- a/content/renderer/web_ui_runner.cc
+++ /dev/null
@@ -1,56 +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.
-
-#include "content/renderer/web_ui_runner.h"
-
-#include "content/public/renderer/render_frame.h"
-#include "gin/modules/module_registry.h"
-#include "gin/per_context_data.h"
-#include "gin/public/context_holder.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebScriptSource.h"
-
-using v8::Context;
-using v8::HandleScope;
-using v8::Isolate;
-using v8::Object;
-using v8::ObjectTemplate;
-using v8::Script;
-
-namespace content {
-
-WebUIRunner::WebUIRunner(blink::WebFrame* frame,
- gin::ContextHolder* context_holder)
- : frame_(frame),
- context_holder_(context_holder) {
- DCHECK(frame_);
- v8::Isolate::Scope isolate_scope(context_holder->isolate());
- HandleScope handle_scope(context_holder->isolate());
- // Note: this installs the runner globally. If we need to support more than
- // one runner at a time we'll have to revisit this.
- gin::PerContextData::From(context_holder->context())->set_runner(this);
-}
-
-WebUIRunner::~WebUIRunner() {
-}
-
-void WebUIRunner::Run(const std::string& source,
- const std::string& resource_name) {
- frame_->executeScript(
- blink::WebScriptSource(blink::WebString::fromUTF8(source)));
-}
-
-v8::Local<v8::Value> WebUIRunner::Call(v8::Local<v8::Function> function,
- v8::Local<v8::Value> receiver,
- int argc,
- v8::Local<v8::Value> argv[]) {
- return frame_->callFunctionEvenIfScriptDisabled(function, receiver, argc,
- argv);
-}
-
-gin::ContextHolder* WebUIRunner::GetContextHolder() {
- return context_holder_;
-}
-
-} // namespace content
« no previous file with comments | « content/renderer/web_ui_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698