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

Side by Side Diff: chrome/browser/system_monitor/removable_device_notifications_window_win.h

Issue 11297002: [Media Gallery] Added code to support mtp device media file system on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 8 years 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_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_ H_ 5 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_ H_
6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_ H_ 6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_ H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 17 matching lines...) Expand all
28 28
29 virtual ~RemovableDeviceNotificationsWindowWin(); 29 virtual ~RemovableDeviceNotificationsWindowWin();
30 30
31 // base::SystemMonitor has a lifetime somewhat shorter than a Singleton and 31 // base::SystemMonitor has a lifetime somewhat shorter than a Singleton and
32 // |this| is constructed/destroyed just after/before SystemMonitor. 32 // |this| is constructed/destroyed just after/before SystemMonitor.
33 static RemovableDeviceNotificationsWindowWin* GetInstance(); 33 static RemovableDeviceNotificationsWindowWin* GetInstance();
34 34
35 // Must be called after the file thread is created. 35 // Must be called after the file thread is created.
36 void Init(); 36 void Init();
37 37
38 // Gets the MTP device storage information specified by |storage_device_id|.
39 // On success, returns true and fills in |device_location| with device
40 // interface details and |storage_object_id| with storage object temporary
41 // identifier.
42 bool GetMTPStorageInfoFromDeviceId(const std::string& storage_device_id,
43 string16* device_location,
44 string16* storage_object_id);
45
38 // Finds the device that contains |path| and populates |device_info|. 46 // Finds the device that contains |path| and populates |device_info|.
39 // Returns false if unable to find the device. 47 // Returns false if unable to find the device.
40 bool GetDeviceInfoForPath( 48 bool GetDeviceInfoForPath(
41 const FilePath& path, 49 const FilePath& path,
42 base::SystemMonitor::RemovableStorageInfo* device_info); 50 base::SystemMonitor::RemovableStorageInfo* device_info);
43 51
44 private: 52 private:
45 class PortableDeviceNotifications; 53 class PortableDeviceNotifications;
46 friend class TestRemovableDeviceNotificationsWindowWin; 54 friend class TestRemovableDeviceNotificationsWindowWin;
47 55
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // The portable device watcher, used to manage media transfer protocol 90 // The portable device watcher, used to manage media transfer protocol
83 // devices. 91 // devices.
84 scoped_ptr<PortableDeviceWatcherWin> portable_device_watcher_; 92 scoped_ptr<PortableDeviceWatcherWin> portable_device_watcher_;
85 93
86 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsWindowWin); 94 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsWindowWin);
87 }; 95 };
88 96
89 } // namespace chrome 97 } // namespace chrome
90 98
91 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_W IN_H_ 99 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_W IN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698