| 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 "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| 11 #include "chrome/common/extensions/extension_constants.h" | 11 #include "chrome/common/extensions/extension_constants.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 14 #include "v8/include/v8.h" | 14 #include "v8/include/v8.h" |
| 15 #include "webkit/fileapi/file_system_util.h" | 15 #include "webkit/fileapi/file_system_util.h" |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 | 18 |
| 19 MediaGalleriesCustomBindings::MediaGalleriesCustomBindings() | 19 MediaGalleriesCustomBindings::MediaGalleriesCustomBindings( |
| 20 : ChromeV8Extension(NULL) { | 20 Dispatcher* dispatcher, v8::Handle<v8::Context> v8_context) |
| 21 : ChromeV8Extension(dispatcher, v8_context) { |
| 21 RouteFunction( | 22 RouteFunction( |
| 22 "GetMediaFileSystemObject", | 23 "GetMediaFileSystemObject", |
| 23 base::Bind(&MediaGalleriesCustomBindings::GetMediaFileSystemObject, | 24 base::Bind(&MediaGalleriesCustomBindings::GetMediaFileSystemObject, |
| 24 base::Unretained(this))); | 25 base::Unretained(this))); |
| 25 RouteFunction( | 26 RouteFunction( |
| 26 "ExtractEmbeddedThumbnails", | 27 "ExtractEmbeddedThumbnails", |
| 27 base::Bind(&MediaGalleriesCustomBindings::ExtractEmbeddedThumbnails, | 28 base::Bind(&MediaGalleriesCustomBindings::ExtractEmbeddedThumbnails, |
| 28 base::Unretained(this))); | 29 base::Unretained(this))); |
| 29 } | 30 } |
| 30 | 31 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 NOTREACHED() << "Bad arguments"; | 71 NOTREACHED() << "Bad arguments"; |
| 71 return v8::Undefined(); | 72 return v8::Undefined(); |
| 72 } | 73 } |
| 73 // TODO(vandebo) Check that the object is a FileEntry. | 74 // TODO(vandebo) Check that the object is a FileEntry. |
| 74 | 75 |
| 75 // TODO(vandebo) Create and return a Directory entry object. | 76 // TODO(vandebo) Create and return a Directory entry object. |
| 76 return v8::Null(); | 77 return v8::Null(); |
| 77 } | 78 } |
| 78 | 79 |
| 79 } // namespace extensions | 80 } // namespace extensions |
| OLD | NEW |