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 "content/common/fileapi/webfilesystem_callback_dispatcher.h" | 5 #include "content/common/fileapi/webfilesystem_callback_dispatcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_util_proxy.h" | 10 #include "base/file_util_proxy.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback
s.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback
s.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 18 #include "webkit/fileapi/file_system_util.h" |
18 #include "webkit/glue/webkit_glue.h" | 19 #include "webkit/glue/webkit_glue.h" |
19 | 20 |
20 using WebKit::WebFileInfo; | 21 using WebKit::WebFileInfo; |
21 using WebKit::WebFileSystemCallbacks; | 22 using WebKit::WebFileSystemCallbacks; |
22 using WebKit::WebFileSystemEntry; | 23 using WebKit::WebFileSystemEntry; |
23 using WebKit::WebString; | 24 using WebKit::WebString; |
24 using WebKit::WebVector; | 25 using WebKit::WebVector; |
25 | 26 |
26 WebFileSystemCallbackDispatcher::WebFileSystemCallbackDispatcher( | 27 WebFileSystemCallbackDispatcher::WebFileSystemCallbackDispatcher( |
27 WebFileSystemCallbacks* callbacks) | 28 WebFileSystemCallbacks* callbacks) |
(...skipping 25 matching lines...) Expand all Loading... |
53 } | 54 } |
54 | 55 |
55 void WebFileSystemCallbackDispatcher::DidOpenFileSystem( | 56 void WebFileSystemCallbackDispatcher::DidOpenFileSystem( |
56 const std::string& name, const GURL& root) { | 57 const std::string& name, const GURL& root) { |
57 callbacks_->didOpenFileSystem(UTF8ToUTF16(name), root); | 58 callbacks_->didOpenFileSystem(UTF8ToUTF16(name), root); |
58 } | 59 } |
59 | 60 |
60 void WebFileSystemCallbackDispatcher::DidFail( | 61 void WebFileSystemCallbackDispatcher::DidFail( |
61 base::PlatformFileError error_code) { | 62 base::PlatformFileError error_code) { |
62 callbacks_->didFail( | 63 callbacks_->didFail( |
63 webkit_glue::PlatformFileErrorToWebFileError(error_code)); | 64 fileapi::PlatformFileErrorToWebFileError(error_code)); |
64 } | 65 } |
65 | 66 |
66 void WebFileSystemCallbackDispatcher::DidWrite(int64 bytes, bool complete) { | 67 void WebFileSystemCallbackDispatcher::DidWrite(int64 bytes, bool complete) { |
67 NOTREACHED(); | 68 NOTREACHED(); |
68 } | 69 } |
OLD | NEW |