| 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 Dispatcher* dispatcher, v8::Handle<v8::Context> v8_context) | 20 : ChromeV8Extension(NULL) { |
| 21 : ChromeV8Extension(dispatcher, v8_context) { | |
| 22 RouteFunction( | 21 RouteFunction( |
| 23 "GetMediaFileSystemObject", | 22 "GetMediaFileSystemObject", |
| 24 base::Bind(&MediaGalleriesCustomBindings::GetMediaFileSystemObject, | 23 base::Bind(&MediaGalleriesCustomBindings::GetMediaFileSystemObject, |
| 25 base::Unretained(this))); | 24 base::Unretained(this))); |
| 26 RouteFunction( | 25 RouteFunction( |
| 27 "ExtractEmbeddedThumbnails", | 26 "ExtractEmbeddedThumbnails", |
| 28 base::Bind(&MediaGalleriesCustomBindings::ExtractEmbeddedThumbnails, | 27 base::Bind(&MediaGalleriesCustomBindings::ExtractEmbeddedThumbnails, |
| 29 base::Unretained(this))); | 28 base::Unretained(this))); |
| 30 } | 29 } |
| 31 | 30 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 NOTREACHED() << "Bad arguments"; | 70 NOTREACHED() << "Bad arguments"; |
| 72 return v8::Undefined(); | 71 return v8::Undefined(); |
| 73 } | 72 } |
| 74 // TODO(vandebo) Check that the object is a FileEntry. | 73 // TODO(vandebo) Check that the object is a FileEntry. |
| 75 | 74 |
| 76 // TODO(vandebo) Create and return a Directory entry object. | 75 // TODO(vandebo) Create and return a Directory entry object. |
| 77 return v8::Null(); | 76 return v8::Null(); |
| 78 } | 77 } |
| 79 | 78 |
| 80 } // namespace extensions | 79 } // namespace extensions |
| OLD | NEW |