| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 PPB_FileSystem_Impl(PluginInstance* instance, PP_FileSystemType type); | 25 PPB_FileSystem_Impl(PluginInstance* instance, PP_FileSystemType type); |
| 26 virtual ~PPB_FileSystem_Impl(); | 26 virtual ~PPB_FileSystem_Impl(); |
| 27 | 27 |
| 28 static PP_Resource Create(PluginInstance* instance, | 28 static PP_Resource Create(PluginInstance* instance, |
| 29 PP_FileSystemType type); | 29 PP_FileSystemType type); |
| 30 | 30 |
| 31 // ResourceObjectBase overrides. | 31 // ResourceObjectBase overrides. |
| 32 virtual ::ppapi::thunk::PPB_FileSystem_API* AsPPB_FileSystem_API() OVERRIDE; | 32 virtual ::ppapi::thunk::PPB_FileSystem_API* AsPPB_FileSystem_API() OVERRIDE; |
| 33 | 33 |
| 34 PluginInstance* instance() { return instance_; } | 34 PluginInstance* instance() { return instance_; } |
| 35 PP_FileSystemType type() { return type_; } | 35 PP_FileSystemType type() const { return type_; } |
| 36 const GURL& root_url() const { return root_url_; } | 36 const GURL& root_url() const { return root_url_; } |
| 37 void set_root_url(const GURL& root_url) { root_url_ = root_url; } | 37 void set_root_url(const GURL& root_url) { root_url_ = root_url; } |
| 38 bool opened() const { return opened_; } | 38 bool opened() const { return opened_; } |
| 39 void set_opened(bool opened) { opened_ = opened; } | 39 void set_opened(bool opened) { opened_ = opened; } |
| 40 | 40 |
| 41 // PPB_FileSystem_API implementation. | 41 // PPB_FileSystem_API implementation. |
| 42 virtual int32_t Open(int64_t expected_size, | 42 virtual int32_t Open(int64_t expected_size, |
| 43 PP_CompletionCallback callback) OVERRIDE; | 43 PP_CompletionCallback callback) OVERRIDE; |
| 44 virtual PP_FileSystemType GetType() OVERRIDE; | 44 virtual PP_FileSystemType GetType() OVERRIDE; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 PluginInstance* instance_; | 47 PluginInstance* instance_; |
| 48 PP_FileSystemType type_; | 48 PP_FileSystemType type_; |
| 49 GURL root_url_; | 49 GURL root_url_; |
| 50 bool opened_; | 50 bool opened_; |
| 51 bool called_open_; | 51 bool called_open_; |
| 52 | 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(PPB_FileSystem_Impl); | 53 DISALLOW_COPY_AND_ASSIGN(PPB_FileSystem_Impl); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace ppapi | 56 } // namespace ppapi |
| 57 } // namespace webkit | 57 } // namespace webkit |
| 58 | 58 |
| 59 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ | 59 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ |
| OLD | NEW |