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

Unified Diff: chrome/renderer/extensions/feedback_private_custom_bindings.cc

Issue 17111003: Implement the feedbackPrivate API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
Index: chrome/renderer/extensions/feedback_private_custom_bindings.cc
diff --git a/chrome/renderer/extensions/feedback_private_custom_bindings.cc b/chrome/renderer/extensions/feedback_private_custom_bindings.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bc84f5e58d8a4be913f0d879f202e1804207d264
--- /dev/null
+++ b/chrome/renderer/extensions/feedback_private_custom_bindings.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 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 "chrome/renderer/extensions/feedback_private_custom_bindings.h"
+
+#include "base/bind.h"
+#include "third_party/WebKit/public/platform/WebCString.h"
+#include "third_party/WebKit/public/platform/WebURL.h"
+#include "third_party/WebKit/public/web/WebBlob.h"
+
+namespace {
+
+void GetBlobUrl(const v8::FunctionCallbackInfo<v8::Value> &args) {
+ DCHECK(args.Length() == 1);
+ WebKit::WebBlob blob = WebKit::WebBlob::fromV8Value(args[0]);
+ args.GetReturnValue().Set(v8::String::New(blob.url().spec().data()));
kinuko 2013/06/18 06:00:56 Drive-by comment. WebBlob::url() returns Blob's in
+}
+
+} // namespace
+
+namespace extensions {
+
+FeedbackPrivateCustomBindings::FeedbackPrivateCustomBindings(
+ Dispatcher* dispatcher,
+ ChromeV8Context* context) : ChromeV8Extension(dispatcher, context) {
+ RouteFunction("GetBlobUrl", base::Bind(&GetBlobUrl));
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698