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

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

Issue 490643005: Files.app: Start to use DeviceEventRouter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 3 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 | « no previous file | chrome/browser/chromeos/extensions/file_manager/device_event_router.cc » ('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 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_EXTENSIONS_FILE_MANAGER_DEVICE_EVENT_ROUTER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_DEVICE_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_DEVICE_EVENT_ROUTER_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_DEVICE_EVENT_ROUTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual void OnVolumeMounted(chromeos::MountError error_code, 50 virtual void OnVolumeMounted(chromeos::MountError error_code,
51 const VolumeInfo& volume_info, 51 const VolumeInfo& volume_info,
52 bool is_remounting) OVERRIDE; 52 bool is_remounting) OVERRIDE;
53 virtual void OnVolumeUnmounted(chromeos::MountError error_code, 53 virtual void OnVolumeUnmounted(chromeos::MountError error_code,
54 const VolumeInfo& volume_info) OVERRIDE; 54 const VolumeInfo& volume_info) OVERRIDE;
55 virtual void OnFormatStarted(const std::string& device_path, 55 virtual void OnFormatStarted(const std::string& device_path,
56 bool success) OVERRIDE; 56 bool success) OVERRIDE;
57 virtual void OnFormatCompleted(const std::string& device_path, 57 virtual void OnFormatCompleted(const std::string& device_path,
58 bool success) OVERRIDE; 58 bool success) OVERRIDE;
59 59
60 // TODO(hirono): Remove the method from VolumeManagerObserver.
61 virtual void OnHardUnplugged(const std::string& device_path) OVERRIDE;
62
63 // PowerManagerClient::Observer overrides. 60 // PowerManagerClient::Observer overrides.
64 virtual void SuspendImminent() OVERRIDE; 61 virtual void SuspendImminent() OVERRIDE;
65 virtual void SuspendDone(const base::TimeDelta& sleep_duration) OVERRIDE; 62 virtual void SuspendDone(const base::TimeDelta& sleep_duration) OVERRIDE;
66 63
64 bool is_resuming() const { return is_resuming_; }
65 bool is_starting_up() const { return is_starting_up_; }
66
67 protected: 67 protected:
68 // Handles a device event containing |type| and |device_path|. 68 // Handles a device event containing |type| and |device_path|.
69 virtual void OnDeviceEvent( 69 virtual void OnDeviceEvent(
70 extensions::api::file_browser_private::DeviceEventType type, 70 extensions::api::file_browser_private::DeviceEventType type,
71 const std::string& device_path) = 0; 71 const std::string& device_path) = 0;
72 // Returns external storage is disabled or not. 72 // Returns external storage is disabled or not.
73 virtual bool IsExternalStorageDisabled() = 0; 73 virtual bool IsExternalStorageDisabled() = 0;
74 74
75 private: 75 private:
76 void StartupDelayed(); 76 void StartupDelayed();
(...skipping 24 matching lines...) Expand all
101 base::ThreadChecker thread_checker_; 101 base::ThreadChecker thread_checker_;
102 102
103 // Note: This should remain the last member so it'll be destroyed and 103 // Note: This should remain the last member so it'll be destroyed and
104 // invalidate the weak pointers before any other members are destroyed. 104 // invalidate the weak pointers before any other members are destroyed.
105 base::WeakPtrFactory<DeviceEventRouter> weak_factory_; 105 base::WeakPtrFactory<DeviceEventRouter> weak_factory_;
106 DISALLOW_COPY_AND_ASSIGN(DeviceEventRouter); 106 DISALLOW_COPY_AND_ASSIGN(DeviceEventRouter);
107 }; 107 };
108 } // namespace file_manager 108 } // namespace file_manager
109 109
110 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_DEVICE_EVENT_ROUTER_H _ 110 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_DEVICE_EVENT_ROUTER_H _
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/device_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698