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

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

Issue 306063005: Use createV8Entry() and toV8Value() with context and isolate defined in WebDOMFileSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 "extensions/renderer/script_context.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"
(...skipping 21 matching lines...) Expand all
32 std::string fs_name = 32 std::string fs_name =
33 fileapi::GetFileSystemName(origin, fileapi::kFileSystemTypeExternal); 33 fileapi::GetFileSystemName(origin, fileapi::kFileSystemTypeExternal);
34 fs_name.append("_"); 34 fs_name.append("_");
35 fs_name.append(fs_mount); 35 fs_name.append(fs_mount);
36 const GURL root_url( 36 const GURL root_url(
37 fileapi::GetExternalFileSystemRootURIString(origin, fs_mount)); 37 fileapi::GetExternalFileSystemRootURIString(origin, fs_mount));
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)
43 .toV8Value(args.Holder(), args.GetIsolate()));
43 } 44 }
44 45
45 } // namespace 46 } // namespace
46 47
47 MediaGalleriesCustomBindings::MediaGalleriesCustomBindings( 48 MediaGalleriesCustomBindings::MediaGalleriesCustomBindings(
48 ScriptContext* context) 49 ScriptContext* context)
49 : ObjectBackedNativeHandler(context) { 50 : ObjectBackedNativeHandler(context) {
50 RouteFunction("GetMediaFileSystemObject", 51 RouteFunction("GetMediaFileSystemObject",
51 base::Bind(&GetMediaFileSystemObject)); 52 base::Bind(&GetMediaFileSystemObject));
52 } 53 }
53 54
54 } // namespace extensions 55 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698