OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPERATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPERATION_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPERATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPERATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" | 12 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" |
13 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" | 13 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" |
14 #include "webkit/browser/fileapi/async_file_util.h" | 14 #include "webkit/browser/fileapi/async_file_util.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class ListValue; | 17 class DictionaryValue; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace extensions { | 20 namespace extensions { |
21 struct Event; | 21 struct Event; |
22 class EventRouter; | 22 class EventRouter; |
23 } // namespace extensions | 23 } // namespace extensions |
24 | 24 |
25 namespace chromeos { | 25 namespace chromeos { |
26 namespace file_system_provider { | 26 namespace file_system_provider { |
27 namespace operations { | 27 namespace operations { |
(...skipping 18 matching lines...) Expand all Loading... |
46 // Sets custom dispatchign event implementation for tests. | 46 // Sets custom dispatchign event implementation for tests. |
47 void SetDispatchEventImplForTesting( | 47 void SetDispatchEventImplForTesting( |
48 const DispatchEventImplCallback& callback); | 48 const DispatchEventImplCallback& callback); |
49 | 49 |
50 protected: | 50 protected: |
51 // Sends an event to the providing extension. Automatically adds the file | 51 // Sends an event to the providing extension. Automatically adds the file |
52 // system id and the request id fields. Returns false, if the providing | 52 // system id and the request id fields. Returns false, if the providing |
53 // extension does not handle the |event_name| event. | 53 // extension does not handle the |event_name| event. |
54 bool SendEvent(int request_id, | 54 bool SendEvent(int request_id, |
55 const std::string& event_name, | 55 const std::string& event_name, |
56 scoped_ptr<base::ListValue> event_args); | 56 scoped_ptr<base::DictionaryValue> options); |
57 | 57 |
58 ProvidedFileSystemInfo file_system_info_; | 58 ProvidedFileSystemInfo file_system_info_; |
59 | 59 |
60 private: | 60 private: |
61 DispatchEventImplCallback dispatch_event_impl_; | 61 DispatchEventImplCallback dispatch_event_impl_; |
62 DISALLOW_COPY_AND_ASSIGN(Operation); | 62 DISALLOW_COPY_AND_ASSIGN(Operation); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace operations | 65 } // namespace operations |
66 } // namespace file_system_provider | 66 } // namespace file_system_provider |
67 } // namespace chromeos | 67 } // namespace chromeos |
68 | 68 |
69 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPERATION_H_ | 69 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPERATION_H_ |
OLD | NEW |