| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/renderer/extensions/feedback_private_custom_bindings.h" |
| 6 |
| 7 #include "base/bind.h" |
| 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBlob.h" |
| 9 #include "third_party/WebKit/public/platform/WebCString.h" |
| 10 #include "third_party/WebKit/public/platform/WebURL.h" |
| 11 |
| 12 namespace { |
| 13 |
| 14 void GetBlobUrl(const v8::FunctionCallbackInfo<v8::Value> &args) { |
| 15 DCHECK(args.Length() == 1); |
| 16 WebKit::WebBlob blob = WebKit::WebBlob::fromV8Value(args[0]); |
| 17 args.GetReturnValue().Set(v8::String::New(blob.url().spec().data())); |
| 18 } |
| 19 |
| 20 } // namespace |
| 21 |
| 22 namespace extensions { |
| 23 |
| 24 FeedbackPrivateCustomBindings::FeedbackPrivateCustomBindings( |
| 25 Dispatcher* dispatcher, |
| 26 ChromeV8Context* context) : ChromeV8Extension(dispatcher, context) { |
| 27 RouteFunction("GetBlobUrl", base::Bind(&GetBlobUrl)); |
| 28 } |
| 29 |
| 30 } // namespace extensions |
| OLD | NEW |