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

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: '' 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
« no previous file with comments | « webkit/fileapi/file_system_context.cc ('k') | webkit/fileapi/isolated_mount_point_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MediaPathFilter; 27 class MediaPathFilter;
23 28
24 class FILEAPI_EXPORT_PRIVATE FileSystemOperationContext { 29 class FILEAPI_EXPORT_PRIVATE FileSystemOperationContext {
25 public: 30 public:
26 explicit FileSystemOperationContext(FileSystemContext* context); 31 explicit FileSystemOperationContext(FileSystemContext* context);
27 ~FileSystemOperationContext(); 32 ~FileSystemOperationContext();
28 33
29 FileSystemContext* file_system_context() const { 34 FileSystemContext* file_system_context() const {
30 return file_system_context_.get(); 35 return file_system_context_.get();
31 } 36 }
32 37
33 void set_allowed_bytes_growth(const int64& allowed_bytes_growth) { 38 void set_allowed_bytes_growth(const int64& allowed_bytes_growth) {
34 allowed_bytes_growth_ = allowed_bytes_growth; 39 allowed_bytes_growth_ = allowed_bytes_growth;
35 } 40 }
36 int64 allowed_bytes_growth() const { return allowed_bytes_growth_; } 41 int64 allowed_bytes_growth() const { return allowed_bytes_growth_; }
37 42
43 #if defined(SUPPORT_MEDIA_FILESYSTEM)
44 void set_media_device(MediaDeviceInterfaceImpl* media_device) {
45 media_device_ = media_device;
46 }
47
48 MediaDeviceInterfaceImpl* media_device() const {
49 return media_device_.get();
50 }
51 #endif
52
38 base::SequencedTaskRunner* file_task_runner() const; 53 base::SequencedTaskRunner* file_task_runner() const;
39 54
40 void set_media_path_filter(MediaPathFilter* media_path_filter) { 55 void set_media_path_filter(MediaPathFilter* media_path_filter) {
41 media_path_filter_ = media_path_filter; 56 media_path_filter_ = media_path_filter;
42 } 57 }
43 58
44 MediaPathFilter* media_path_filter() { 59 MediaPathFilter* media_path_filter() {
45 return media_path_filter_; 60 return media_path_filter_;
46 } 61 }
47 62
48 private: 63 private:
49 scoped_refptr<FileSystemContext> file_system_context_; 64 scoped_refptr<FileSystemContext> file_system_context_;
50 65
51 int64 allowed_bytes_growth_; 66 int64 allowed_bytes_growth_;
52 MediaPathFilter* media_path_filter_; 67 MediaPathFilter* media_path_filter_;
68
69 #if defined(SUPPORT_MEDIA_FILESYSTEM)
70 // Store the current media device.
71 scoped_refptr<MediaDeviceInterfaceImpl> media_device_;
72 #endif
53 }; 73 };
54 74
55 } // namespace fileapi 75 } // namespace fileapi
56 76
57 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ 77 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_context.cc ('k') | webkit/fileapi/isolated_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698