OLD | NEW |
---|---|
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" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 #if defined(SUPPORT_MEDIA_FILESYSTEM) | 43 #if defined(SUPPORT_MEDIA_FILESYSTEM) |
44 void set_media_device(MediaDeviceInterfaceImpl* media_device) { | 44 void set_media_device(MediaDeviceInterfaceImpl* media_device) { |
45 media_device_ = media_device; | 45 media_device_ = media_device; |
46 } | 46 } |
47 | 47 |
48 MediaDeviceInterfaceImpl* media_device() const { | 48 MediaDeviceInterfaceImpl* media_device() const { |
49 return media_device_.get(); | 49 return media_device_.get(); |
50 } | 50 } |
51 #endif | 51 #endif |
52 | 52 |
53 base::SequencedTaskRunner* file_task_runner() const; | 53 // Returns TaskRunner which the operation is performed on. |
54 base::SequencedTaskRunner* task_runner() const { | |
55 return task_runner_.get(); | |
56 } | |
57 | |
58 // Overrides TaskRunner which the operation is performed on. | |
59 // FILE thread is set as default value. | |
kinuko
2012/08/03 23:13:39
nit: "file_system_context_->task_runners()->file_t
tzik
2012/08/04 00:24:21
Done.
| |
60 void SetTaskRunner(base::SequencedTaskRunner* task_runner); | |
54 | 61 |
55 void set_media_path_filter(MediaPathFilter* media_path_filter) { | 62 void set_media_path_filter(MediaPathFilter* media_path_filter) { |
56 media_path_filter_ = media_path_filter; | 63 media_path_filter_ = media_path_filter; |
57 } | 64 } |
58 | 65 |
59 MediaPathFilter* media_path_filter() { | 66 MediaPathFilter* media_path_filter() { |
60 return media_path_filter_; | 67 return media_path_filter_; |
61 } | 68 } |
62 | 69 |
63 private: | 70 private: |
64 scoped_refptr<FileSystemContext> file_system_context_; | 71 scoped_refptr<FileSystemContext> file_system_context_; |
72 scoped_refptr<base::SequencedTaskRunner> task_runner_; | |
65 | 73 |
66 int64 allowed_bytes_growth_; | 74 int64 allowed_bytes_growth_; |
67 MediaPathFilter* media_path_filter_; | 75 MediaPathFilter* media_path_filter_; |
68 | 76 |
69 #if defined(SUPPORT_MEDIA_FILESYSTEM) | 77 #if defined(SUPPORT_MEDIA_FILESYSTEM) |
70 // Store the current media device. | 78 // Store the current media device. |
71 scoped_refptr<MediaDeviceInterfaceImpl> media_device_; | 79 scoped_refptr<MediaDeviceInterfaceImpl> media_device_; |
72 #endif | 80 #endif |
73 }; | 81 }; |
74 | 82 |
75 } // namespace fileapi | 83 } // namespace fileapi |
76 | 84 |
77 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ | 85 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_CONTEXT_H_ |
OLD | NEW |