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

Side by Side Diff: webkit/plugins/ppapi/file_callbacks.cc

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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) 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/plugins/ppapi/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 "ppapi/c/dev/ppb_file_system_dev.h" 9 #include "ppapi/c/dev/ppb_file_system_dev.h"
10 #include "ppapi/c/dev/pp_file_info_dev.h" 10 #include "ppapi/c/dev/pp_file_info_dev.h"
11 #include "ppapi/c/pp_errors.h" 11 #include "ppapi/c/pp_errors.h"
12 #include "webkit/glue/plugins/pepper_directory_reader.h" 12 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
13 #include "webkit/glue/plugins/pepper_error_util.h" 13 #include "webkit/plugins/ppapi/error_util.h"
14 #include "webkit/glue/plugins/pepper_file_system.h" 14 #include "webkit/plugins/ppapi/ppb_file_system_impl.h"
15 #include "webkit/fileapi/file_system_types.h" 15 #include "webkit/fileapi/file_system_types.h"
16 16
17 namespace pepper { 17 namespace webkit {
18 namespace plugins {
19 namespace ppapi {
18 20
19 FileCallbacks::FileCallbacks(const base::WeakPtr<PluginModule>& module, 21 FileCallbacks::FileCallbacks(
20 PP_CompletionCallback callback, 22 const base::WeakPtr<PluginModule>& module,
21 PP_FileInfo_Dev* info, 23 PP_CompletionCallback callback,
22 scoped_refptr<FileSystem> file_system, 24 PP_FileInfo_Dev* info,
23 scoped_refptr<DirectoryReader> directory_reader) 25 scoped_refptr<PPB_FileSystem_Impl> file_system,
26 scoped_refptr<PPB_DirectoryReader_Impl> directory_reader)
24 : module_(module), 27 : module_(module),
25 callback_(callback), 28 callback_(callback),
26 info_(info), 29 info_(info),
27 file_system_(file_system), 30 file_system_(file_system),
28 directory_reader_(directory_reader) { 31 directory_reader_(directory_reader) {
29 } 32 }
30 33
31 FileCallbacks::~FileCallbacks() {} 34 FileCallbacks::~FileCallbacks() {}
32 35
33 void FileCallbacks::DidSucceed() { 36 void FileCallbacks::DidSucceed() {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 89
87 void FileCallbacks::DidWrite(int64 bytes, bool complete) { 90 void FileCallbacks::DidWrite(int64 bytes, bool complete) {
88 NOTREACHED(); 91 NOTREACHED();
89 } 92 }
90 93
91 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { 94 void FileCallbacks::RunCallback(base::PlatformFileError error_code) {
92 if (!module_.get() || !callback_.func) 95 if (!module_.get() || !callback_.func)
93 return; 96 return;
94 97
95 PP_RunCompletionCallback( 98 PP_RunCompletionCallback(
96 &callback_, pepper::PlatformFileErrorToPepperError(error_code)); 99 &callback_, PlatformFileErrorToPepperError(error_code));
97 } 100 }
98 101
99 } // namespace pepper 102 } // namespace ppapi
103 } // namespace plugins
104 } // namespace webkit
105
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698