Chromium Code Reviews| 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 |