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 CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE; | 85 virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE; |
86 | 86 |
87 private: | 87 private: |
88 friend class FileBrowserEventRouterFactory; | 88 friend class FileBrowserEventRouterFactory; |
89 | 89 |
90 // Helper class for passing through file watch notification events. | 90 // Helper class for passing through file watch notification events. |
91 class FileWatcherDelegate : public base::files::FilePathWatcher::Delegate { | 91 class FileWatcherDelegate : public base::files::FilePathWatcher::Delegate { |
92 public: | 92 public: |
93 explicit FileWatcherDelegate(FileBrowserEventRouter* router); | 93 explicit FileWatcherDelegate(FileBrowserEventRouter* router); |
94 | 94 |
| 95 protected: |
| 96 virtual ~FileWatcherDelegate() {} |
| 97 |
95 private: | 98 private: |
96 // base::files::FilePathWatcher::Delegate overrides. | 99 // base::files::FilePathWatcher::Delegate overrides. |
97 virtual void OnFilePathChanged(const FilePath& path) OVERRIDE; | 100 virtual void OnFilePathChanged(const FilePath& path) OVERRIDE; |
98 virtual void OnFilePathError(const FilePath& path) OVERRIDE; | 101 virtual void OnFilePathError(const FilePath& path) OVERRIDE; |
99 | 102 |
100 void HandleFileWatchOnUIThread(const FilePath& local_path, bool got_error); | 103 void HandleFileWatchOnUIThread(const FilePath& local_path, bool got_error); |
101 | 104 |
102 FileBrowserEventRouter* router_; | 105 FileBrowserEventRouter* router_; |
103 }; | 106 }; |
104 | 107 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 224 |
222 FileBrowserEventRouterFactory(); | 225 FileBrowserEventRouterFactory(); |
223 virtual ~FileBrowserEventRouterFactory(); | 226 virtual ~FileBrowserEventRouterFactory(); |
224 | 227 |
225 // ProfileKeyedServiceFactory: | 228 // ProfileKeyedServiceFactory: |
226 virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor( | 229 virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor( |
227 Profile* profile) const OVERRIDE; | 230 Profile* profile) const OVERRIDE; |
228 }; | 231 }; |
229 | 232 |
230 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ | 233 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ |
OLD | NEW |