Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: chrome/renderer/extensions/media_galleries_custom_bindings.cc

Issue 12886018: Add support for WEBKIT_USE_NEW_WEBFILESYSTEMTYPE (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (name.empty()) { 53 if (name.empty()) {
54 NOTREACHED(); 54 NOTREACHED();
55 return v8::Undefined(); 55 return v8::Undefined();
56 } 56 }
57 57
58 WebKit::WebFrame* webframe = WebKit::WebFrame::frameForCurrentContext(); 58 WebKit::WebFrame* webframe = WebKit::WebFrame::frameForCurrentContext();
59 const GURL origin = GURL(webframe->document().securityOrigin().toString()); 59 const GURL origin = GURL(webframe->document().securityOrigin().toString());
60 const std::string root_url = 60 const std::string root_url =
61 fileapi::GetIsolatedFileSystemRootURIString( 61 fileapi::GetIsolatedFileSystemRootURIString(
62 origin, fsid, extension_misc::kMediaFileSystemPathPart); 62 origin, fsid, extension_misc::kMediaFileSystemPathPart);
63 return webframe->createFileSystem(WebKit::WebFileSystem::TypeIsolated, 63 return webframe->createFileSystem(
64 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
65 WebKit::WebFileSystemTypeIsolated,
66 #else
67 WebKit::WebFileSystem::TypeIsolated,
68 #endif
64 WebKit::WebString::fromUTF8(name), 69 WebKit::WebString::fromUTF8(name),
65 WebKit::WebString::fromUTF8(root_url)); 70 WebKit::WebString::fromUTF8(root_url));
66 } 71 }
67 72
68 v8::Handle<v8::Value> MediaGalleriesCustomBindings::ExtractEmbeddedThumbnails( 73 v8::Handle<v8::Value> MediaGalleriesCustomBindings::ExtractEmbeddedThumbnails(
69 const v8::Arguments& args) { 74 const v8::Arguments& args) {
70 if (args.Length() != 1) { 75 if (args.Length() != 1) {
71 NOTREACHED() << "Bad arguments"; 76 NOTREACHED() << "Bad arguments";
72 return v8::Undefined(); 77 return v8::Undefined();
73 } 78 }
74 // TODO(vandebo) Check that the object is a FileEntry. 79 // TODO(vandebo) Check that the object is a FileEntry.
75 80
76 // TODO(vandebo) Create and return a Directory entry object. 81 // TODO(vandebo) Create and return a Directory entry object.
77 return v8::Null(); 82 return v8::Null();
78 } 83 }
79 84
80 } // namespace extensions 85 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/file_system_natives.cc ('k') | chrome/renderer/extensions/sync_file_system_custom_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698