OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/glue/plugins/pepper_file_callbacks.h" | 5 #include "webkit/glue/plugins/pepper_file_callbacks.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "third_party/ppapi/c/dev/ppb_file_system_dev.h" | 9 #include "third_party/ppapi/c/dev/ppb_file_system_dev.h" |
10 #include "third_party/ppapi/c/dev/pp_file_info_dev.h" | 10 #include "third_party/ppapi/c/dev/pp_file_info_dev.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 info_->system_type = file_system_->type(); | 48 info_->system_type = file_system_->type(); |
49 if (file_info.is_directory) | 49 if (file_info.is_directory) |
50 info_->type = PP_FILETYPE_DIRECTORY; | 50 info_->type = PP_FILETYPE_DIRECTORY; |
51 else | 51 else |
52 info_->type = PP_FILETYPE_REGULAR; | 52 info_->type = PP_FILETYPE_REGULAR; |
53 | 53 |
54 PP_RunCompletionCallback(&callback_, PP_OK); | 54 PP_RunCompletionCallback(&callback_, PP_OK); |
55 } | 55 } |
56 | 56 |
57 void FileCallbacks::DidReadDirectory( | 57 void FileCallbacks::DidReadDirectory( |
58 const std::vector<base::file_util_proxy::Entry>&, bool) { | 58 const std::vector<base::FileUtilProxy::Entry>&, bool) { |
59 NOTREACHED(); | 59 NOTREACHED(); |
60 } | 60 } |
61 | 61 |
62 void FileCallbacks::DidOpenFileSystem(const std::string&, | 62 void FileCallbacks::DidOpenFileSystem(const std::string&, |
63 const FilePath& root_path) { | 63 const FilePath& root_path) { |
64 if (!module_.get() || !callback_.func) | 64 if (!module_.get() || !callback_.func) |
65 return; | 65 return; |
66 | 66 |
67 DCHECK(file_system_); | 67 DCHECK(file_system_); |
68 file_system_->set_root_path(root_path); | 68 file_system_->set_root_path(root_path); |
(...skipping 12 matching lines...) Expand all Loading... |
81 | 81 |
82 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { | 82 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { |
83 if (!module_.get() || !callback_.func) | 83 if (!module_.get() || !callback_.func) |
84 return; | 84 return; |
85 | 85 |
86 PP_RunCompletionCallback( | 86 PP_RunCompletionCallback( |
87 &callback_, pepper::PlatformFileErrorToPepperError(error_code)); | 87 &callback_, pepper::PlatformFileErrorToPepperError(error_code)); |
88 } | 88 } |
89 | 89 |
90 } // namespace pepper | 90 } // namespace pepper |
OLD | NEW |