| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/extensions/experimental.app_custom_bindings.h" | 5 #include "chrome/renderer/extensions/app_runtime_custom_bindings.h" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBlob.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBlob.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 11 | 11 |
| 12 using WebKit::WebBlob; | 12 using WebKit::WebBlob; |
| 13 using WebKit::WebSerializedScriptValue; | 13 using WebKit::WebSerializedScriptValue; |
| 14 using WebKit::WebString; | 14 using WebKit::WebString; |
| 15 | 15 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 37 DCHECK(base::StringToInt64(blob_length_string, &blob_length)); | 37 DCHECK(base::StringToInt64(blob_length_string, &blob_length)); |
| 38 WebKit::WebBlob web_blob = WebBlob::createFromFile( | 38 WebKit::WebBlob web_blob = WebBlob::createFromFile( |
| 39 WebString::fromUTF8(blob_file_path), blob_length); | 39 WebString::fromUTF8(blob_file_path), blob_length); |
| 40 return web_blob.toV8Value(); | 40 return web_blob.toV8Value(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace | 43 } // namespace |
| 44 | 44 |
| 45 namespace extensions { | 45 namespace extensions { |
| 46 | 46 |
| 47 ExperimentalAppCustomBindings::ExperimentalAppCustomBindings() | 47 AppRuntimeCustomBindings::AppRuntimeCustomBindings() |
| 48 : ChromeV8Extension(NULL) { | 48 : ChromeV8Extension(NULL) { |
| 49 RouteStaticFunction("DeserializeString", &DeserializeString); | 49 RouteStaticFunction("DeserializeString", &DeserializeString); |
| 50 RouteStaticFunction("CreateBlob", &CreateBlob); | 50 RouteStaticFunction("CreateBlob", &CreateBlob); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace extensions | 53 } // namespace extensions |
| OLD | NEW |