| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/renderer/file_system_natives.h" | 5 #include "extensions/renderer/file_system_natives.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "extensions/common/constants.h" | 9 #include "extensions/common/constants.h" |
| 10 #include "extensions/renderer/script_context.h" | 10 #include "extensions/renderer/script_context.h" |
| 11 #include "storage/common/fileapi/file_system_types.h" |
| 12 #include "storage/common/fileapi/file_system_util.h" |
| 11 #include "third_party/WebKit/public/platform/WebString.h" | 13 #include "third_party/WebKit/public/platform/WebString.h" |
| 12 #include "third_party/WebKit/public/web/WebDOMError.h" | 14 #include "third_party/WebKit/public/web/WebDOMError.h" |
| 13 #include "third_party/WebKit/public/web/WebDOMFileSystem.h" | 15 #include "third_party/WebKit/public/web/WebDOMFileSystem.h" |
| 14 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 16 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 15 #include "webkit/common/fileapi/file_system_types.h" | |
| 16 #include "webkit/common/fileapi/file_system_util.h" | |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 | 19 |
| 20 FileSystemNatives::FileSystemNatives(ScriptContext* context) | 20 FileSystemNatives::FileSystemNatives(ScriptContext* context) |
| 21 : ObjectBackedNativeHandler(context) { | 21 : ObjectBackedNativeHandler(context) { |
| 22 RouteFunction( | 22 RouteFunction( |
| 23 "GetFileEntry", | 23 "GetFileEntry", |
| 24 base::Bind(&FileSystemNatives::GetFileEntry, base::Unretained(this))); | 24 base::Bind(&FileSystemNatives::GetFileEntry, base::Unretained(this))); |
| 25 RouteFunction("GetIsolatedFileSystem", | 25 RouteFunction("GetIsolatedFileSystem", |
| 26 base::Bind(&FileSystemNatives::GetIsolatedFileSystem, | 26 base::Bind(&FileSystemNatives::GetIsolatedFileSystem, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 std::string message(*v8::String::Utf8Value(args[1])); | 147 std::string message(*v8::String::Utf8Value(args[1])); |
| 148 // message is optional hence empty is fine. | 148 // message is optional hence empty is fine. |
| 149 | 149 |
| 150 blink::WebDOMError dom_error = blink::WebDOMError::create( | 150 blink::WebDOMError dom_error = blink::WebDOMError::create( |
| 151 blink::WebString::fromUTF8(name), blink::WebString::fromUTF8(message)); | 151 blink::WebString::fromUTF8(name), blink::WebString::fromUTF8(message)); |
| 152 args.GetReturnValue().Set( | 152 args.GetReturnValue().Set( |
| 153 dom_error.toV8Value(args.Holder(), args.GetIsolate())); | 153 dom_error.toV8Value(args.Holder(), args.GetIsolate())); |
| 154 } | 154 } |
| 155 | 155 |
| 156 } // namespace extensions | 156 } // namespace extensions |
| OLD | NEW |