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

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

Issue 240603003: Remove ChromeV8Extension & most of ChromeV8Context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 8 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/file_browser_handler_custom_bindings.h" 5 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "chrome/renderer/extensions/chrome_v8_context.h" 11 #include "extensions/renderer/script_context.h"
12 #include "grit/renderer_resources.h"
13 #include "third_party/WebKit/public/platform/WebString.h" 12 #include "third_party/WebKit/public/platform/WebString.h"
14 #include "third_party/WebKit/public/web/WebDOMFileSystem.h" 13 #include "third_party/WebKit/public/web/WebDOMFileSystem.h"
15 #include "third_party/WebKit/public/web/WebLocalFrame.h" 14 #include "third_party/WebKit/public/web/WebLocalFrame.h"
16 15
17 namespace extensions { 16 namespace extensions {
18 17
19 FileBrowserHandlerCustomBindings::FileBrowserHandlerCustomBindings( 18 FileBrowserHandlerCustomBindings::FileBrowserHandlerCustomBindings(
20 Dispatcher* dispatcher, ChromeV8Context* context) 19 ScriptContext* context)
21 : ChromeV8Extension(dispatcher, context) { 20 : ObjectBackedNativeHandler(context) {
22 RouteFunction( 21 RouteFunction(
23 "GetExternalFileEntry", 22 "GetExternalFileEntry",
24 base::Bind(&FileBrowserHandlerCustomBindings::GetExternalFileEntry, 23 base::Bind(&FileBrowserHandlerCustomBindings::GetExternalFileEntry,
25 base::Unretained(this))); 24 base::Unretained(this)));
26 } 25 }
27 26
28 void FileBrowserHandlerCustomBindings::GetExternalFileEntry( 27 void FileBrowserHandlerCustomBindings::GetExternalFileEntry(
29 const v8::FunctionCallbackInfo<v8::Value>& args) { 28 const v8::FunctionCallbackInfo<v8::Value>& args) {
30 // TODO(zelidrag): Make this magic work on other platforms when file browser 29 // TODO(zelidrag): Make this magic work on other platforms when file browser
31 // matures enough on ChromeOS. 30 // matures enough on ChromeOS.
(...skipping 22 matching lines...) Expand all
54 webframe, 53 webframe,
55 blink::WebFileSystemTypeExternal, 54 blink::WebFileSystemTypeExternal,
56 blink::WebString::fromUTF8(file_system_name), 55 blink::WebString::fromUTF8(file_system_name),
57 file_system_root).createV8Entry( 56 file_system_root).createV8Entry(
58 blink::WebString::fromUTF8(file_full_path), 57 blink::WebString::fromUTF8(file_full_path),
59 entry_type)); 58 entry_type));
60 #endif 59 #endif
61 } 60 }
62 61
63 } // namespace extensions 62 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698