| 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/media_galleries_custom_bindings.h" | 5 #include "chrome/renderer/extensions/media_galleries_custom_bindings.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/common/extensions/extension_constants.h" | 9 #include "extensions/renderer/script_context.h" |
| 10 #include "third_party/WebKit/public/web/WebDOMFileSystem.h" | 10 #include "third_party/WebKit/public/web/WebDOMFileSystem.h" |
| 11 #include "third_party/WebKit/public/web/WebDocument.h" | 11 #include "third_party/WebKit/public/web/WebDocument.h" |
| 12 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 12 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 13 #include "v8/include/v8.h" | 13 #include "v8/include/v8.h" |
| 14 #include "webkit/common/fileapi/file_system_util.h" | 14 #include "webkit/common/fileapi/file_system_util.h" |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 38 args.GetReturnValue().Set( | 38 args.GetReturnValue().Set( |
| 39 blink::WebDOMFileSystem::create(webframe, | 39 blink::WebDOMFileSystem::create(webframe, |
| 40 blink::WebFileSystemTypeExternal, | 40 blink::WebFileSystemTypeExternal, |
| 41 blink::WebString::fromUTF8(fs_name), | 41 blink::WebString::fromUTF8(fs_name), |
| 42 root_url).toV8Value()); | 42 root_url).toV8Value()); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 MediaGalleriesCustomBindings::MediaGalleriesCustomBindings( | 47 MediaGalleriesCustomBindings::MediaGalleriesCustomBindings( |
| 48 Dispatcher* dispatcher, ChromeV8Context* context) | 48 ScriptContext* context) |
| 49 : ChromeV8Extension(dispatcher, context) { | 49 : ObjectBackedNativeHandler(context) { |
| 50 RouteFunction("GetMediaFileSystemObject", | 50 RouteFunction("GetMediaFileSystemObject", |
| 51 base::Bind(&GetMediaFileSystemObject)); | 51 base::Bind(&GetMediaFileSystemObject)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace extensions | 54 } // namespace extensions |
| OLD | NEW |