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

Side by Side Diff: webkit/fileapi/file_system_operation_context.h

Issue 10781014: Isolated FS for media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 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) 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 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 #include "webkit/fileapi/fileapi_export.h" 11 #include "webkit/fileapi/fileapi_export.h"
12 #include "webkit/fileapi/file_system_context.h" 12 #include "webkit/fileapi/file_system_context.h"
13 #include "webkit/fileapi/file_system_file_util.h" 13 #include "webkit/fileapi/file_system_file_util.h"
14 #include "webkit/fileapi/file_system_types.h" 14 #include "webkit/fileapi/file_system_types.h"
15 #include "webkit/fileapi/media/media_file_system_config.h"
16
17 #if defined(SUPPORT_MEDIA_FILESYSTEM)
18 #include "webkit/fileapi/media/media_device_interface_impl.h"
19 #endif
15 20
16 namespace base { 21 namespace base {
17 class SequencedTaskRunner; 22 class SequencedTaskRunner;
18 } 23 }
19 24
20 namespace fileapi { 25 namespace fileapi {
21 26
22 class FILEAPI_EXPORT_PRIVATE FileSystemOperationContext { 27 class FILEAPI_EXPORT_PRIVATE FileSystemOperationContext {
23 public: 28 public:
24 explicit FileSystemOperationContext(FileSystemContext* context); 29 explicit FileSystemOperationContext(FileSystemContext* context);
25 ~FileSystemOperationContext(); 30 ~FileSystemOperationContext();
26 31
27 FileSystemContext* file_system_context() const { 32 FileSystemContext* file_system_context() const {
28 return file_system_context_.get(); 33 return file_system_context_.get();
29 } 34 }
30 35
31 void set_allowed_bytes_growth(const int64& allowed_bytes_growth) { 36 void set_allowed_bytes_growth(const int64& allowed_bytes_growth) {
32 allowed_bytes_growth_ = allowed_bytes_growth; 37 allowed_bytes_growth_ = allowed_bytes_growth;
33 } 38 }
34 int64 allowed_bytes_growth() const { return allowed_bytes_growth_; } 39 int64 allowed_bytes_growth() const { return allowed_bytes_growth_; }
35 40
41 #if defined(SUPPORT_MEDIA_FILESYSTEM)
42 void set_media_device(MediaDeviceInterfaceImpl* media_device) {
43 media_device_ = media_device;
44 }
45
46 scoped_refptr<MediaDeviceInterfaceImpl> media_device() const {
kinuko 2012/07/28 02:29:59 nit: this could probably just return a pointer?
kmadhusu 2012/07/28 23:15:30 Done.
47 return media_device_;
48 }
49 #endif
50
36 base::SequencedTaskRunner* file_task_runner() const; 51 base::SequencedTaskRunner* file_task_runner() const;
37 52
38 private: 53 private:
39 scoped_refptr<FileSystemContext> file_system_context_; 54 scoped_refptr<FileSystemContext> file_system_context_;
40 55
41 int64 allowed_bytes_growth_; 56 int64 allowed_bytes_growth_;
57
58 #if defined(SUPPORT_MEDIA_FILESYSTEM)
59 // Store the current media device.
60 scoped_refptr<MediaDeviceInterfaceImpl> media_device_;
61 #endif
62
42 }; 63 };
43 64
44 } // namespace fileapi 65 } // namespace fileapi
45 66
46 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ 67 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698