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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/event_router.h

Issue 22264004: Remove ConnectivityStateHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove redundant IsConnected() check Created 7 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 CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/files/file_path_watcher.h" 11 #include "base/files/file_path_watcher.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 13 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
14 #include "chrome/browser/chromeos/drive/file_system_observer.h" 14 #include "chrome/browser/chromeos/drive/file_system_observer.h"
15 #include "chrome/browser/chromeos/drive/job_list.h" 15 #include "chrome/browser/chromeos/drive/job_list.h"
16 #include "chrome/browser/chromeos/extensions/file_manager/file_watcher.h" 16 #include "chrome/browser/chromeos/extensions/file_manager/file_watcher.h"
17 #include "chrome/browser/chromeos/net/connectivity_state_helper_observer.h"
18 #include "chrome/browser/drive/drive_service_interface.h" 17 #include "chrome/browser/drive/drive_service_interface.h"
19 #include "chromeos/disks/disk_mount_manager.h" 18 #include "chromeos/disks/disk_mount_manager.h"
19 #include "chromeos/network/network_state_handler_observer.h"
20 20
21 class PrefChangeRegistrar; 21 class PrefChangeRegistrar;
22 class Profile; 22 class Profile;
23 23
24 namespace chromeos {
25 class NetworkState;
26 }
27
24 namespace file_manager { 28 namespace file_manager {
25 29
26 class DesktopNotifications; 30 class DesktopNotifications;
27 class MountedDiskMonitor; 31 class MountedDiskMonitor;
28 32
29 // Monitors changes in disk mounts, network connection state and preferences 33 // Monitors changes in disk mounts, network connection state and preferences
30 // affecting File Manager. Dispatches appropriate File Browser events. 34 // affecting File Manager. Dispatches appropriate File Browser events.
31 class EventRouter 35 class EventRouter
32 : public chromeos::disks::DiskMountManager::Observer, 36 : public chromeos::disks::DiskMountManager::Observer,
33 public chromeos::ConnectivityStateHelperObserver, 37 public chromeos::NetworkStateHandlerObserver,
34 public drive::DriveIntegrationServiceObserver, 38 public drive::DriveIntegrationServiceObserver,
35 public drive::FileSystemObserver, 39 public drive::FileSystemObserver,
36 public drive::JobListObserver, 40 public drive::JobListObserver,
37 public drive::DriveServiceObserver { 41 public drive::DriveServiceObserver {
38 public: 42 public:
39 explicit EventRouter(Profile* profile); 43 explicit EventRouter(Profile* profile);
40 virtual ~EventRouter(); 44 virtual ~EventRouter();
41 45
42 void Shutdown(); 46 void Shutdown();
43 47
(...skipping 26 matching lines...) Expand all
70 virtual void OnMountEvent( 74 virtual void OnMountEvent(
71 chromeos::disks::DiskMountManager::MountEvent event, 75 chromeos::disks::DiskMountManager::MountEvent event,
72 chromeos::MountError error_code, 76 chromeos::MountError error_code,
73 const chromeos::disks::DiskMountManager::MountPointInfo& mount_info) 77 const chromeos::disks::DiskMountManager::MountPointInfo& mount_info)
74 OVERRIDE; 78 OVERRIDE;
75 virtual void OnFormatEvent( 79 virtual void OnFormatEvent(
76 chromeos::disks::DiskMountManager::FormatEvent event, 80 chromeos::disks::DiskMountManager::FormatEvent event,
77 chromeos::FormatError error_code, 81 chromeos::FormatError error_code,
78 const std::string& device_path) OVERRIDE; 82 const std::string& device_path) OVERRIDE;
79 83
80 // chromeos::ConnectivityStateHelperObserver override. 84 // chromeos::NetworkStateHandlerObserver overrides.
81 virtual void NetworkManagerChanged() OVERRIDE; 85 virtual void NetworkManagerChanged() OVERRIDE;
82 virtual void DefaultNetworkChanged() OVERRIDE; 86 virtual void DefaultNetworkChanged(
87 const chromeos::NetworkState* network) OVERRIDE;
83 88
84 // drive::JobListObserver overrides. 89 // drive::JobListObserver overrides.
85 virtual void OnJobAdded(const drive::JobInfo& job_info) OVERRIDE; 90 virtual void OnJobAdded(const drive::JobInfo& job_info) OVERRIDE;
86 virtual void OnJobUpdated(const drive::JobInfo& job_info) OVERRIDE; 91 virtual void OnJobUpdated(const drive::JobInfo& job_info) OVERRIDE;
87 virtual void OnJobDone(const drive::JobInfo& job_info, 92 virtual void OnJobDone(const drive::JobInfo& job_info,
88 drive::FileError error) OVERRIDE; 93 drive::FileError error) OVERRIDE;
89 94
90 // drive::DriveServiceObserver overrides. 95 // drive::DriveServiceObserver overrides.
91 virtual void OnRefreshTokenInvalid() OVERRIDE; 96 virtual void OnRefreshTokenInvalid() OVERRIDE;
92 97
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 170
166 // Note: This should remain the last member so it'll be destroyed and 171 // Note: This should remain the last member so it'll be destroyed and
167 // invalidate the weak pointers before any other members are destroyed. 172 // invalidate the weak pointers before any other members are destroyed.
168 base::WeakPtrFactory<EventRouter> weak_factory_; 173 base::WeakPtrFactory<EventRouter> weak_factory_;
169 DISALLOW_COPY_AND_ASSIGN(EventRouter); 174 DISALLOW_COPY_AND_ASSIGN(EventRouter);
170 }; 175 };
171 176
172 } // namespace file_manager 177 } // namespace file_manager
173 178
174 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ 179 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698