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

Side by Side Diff: webkit/plugins/ppapi/ppb_file_system_impl.h

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 4 months 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) 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 10 matching lines...) Expand all
21 21
22 class PPB_FileSystem_Impl : public Resource, 22 class PPB_FileSystem_Impl : public Resource,
23 public ::ppapi::thunk::PPB_FileSystem_API { 23 public ::ppapi::thunk::PPB_FileSystem_API {
24 public: 24 public:
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 // Resource 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() const { 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698