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

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

Issue 76703002: Media Galleries API Metadata: Make Blob native extension bindings available to multiple extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « chrome/renderer/extensions/blob_native_handler.h ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/blob_native_handler.cc
diff --git a/chrome/renderer/extensions/feedback_private_custom_bindings.cc b/chrome/renderer/extensions/blob_native_handler.cc
similarity index 65%
rename from chrome/renderer/extensions/feedback_private_custom_bindings.cc
rename to chrome/renderer/extensions/blob_native_handler.cc
index 9b9d5f2f1929255cbaca54f2ce61650ce3d06ce7..304dcbabe59973fdba84ea61c072627c64990c4e 100644
--- a/chrome/renderer/extensions/feedback_private_custom_bindings.cc
+++ b/chrome/renderer/extensions/blob_native_handler.cc
@@ -2,7 +2,7 @@
// 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 "chrome/renderer/extensions/blob_native_handler.h"
#include "base/bind.h"
#include "third_party/WebKit/public/platform/WebCString.h"
@@ -11,8 +11,9 @@
namespace {
-void GetBlobUuid(const v8::FunctionCallbackInfo<v8::Value> &args) {
- DCHECK(args.Length() == 1);
+// Expects a single Blob argument. Returns the Blob's UUID.
+void GetBlobUuid(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ DCHECK_EQ(1, args.Length());
blink::WebBlob blob = blink::WebBlob::fromV8Value(args[0]);
args.GetReturnValue().Set(v8::String::New(blob.uuid().utf8().data()));
}
@@ -21,9 +22,8 @@ void GetBlobUuid(const v8::FunctionCallbackInfo<v8::Value> &args) {
namespace extensions {
-FeedbackPrivateCustomBindings::FeedbackPrivateCustomBindings(
- Dispatcher* dispatcher,
- ChromeV8Context* context) : ChromeV8Extension(dispatcher, context) {
+BlobNativeHandler::BlobNativeHandler(ChromeV8Context* context)
+ : ObjectBackedNativeHandler(context) {
RouteFunction("GetBlobUuid", base::Bind(&GetBlobUuid));
}
« no previous file with comments | « chrome/renderer/extensions/blob_native_handler.h ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698