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

Side by Side Diff: chrome/browser/chromeos/usb_mount_observer.h

Issue 2496002: Fixing mounting so that it remounts any devices it finds on boot. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_USB_MOUNT_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_USB_MOUNT_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_USB_MOUNT_OBSERVER_H_ 6 #define CHROME_BROWSER_CHROMEOS_USB_MOUNT_OBSERVER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 static USBMountObserver* Get() { 36 static USBMountObserver* Get() {
37 return Singleton<USBMountObserver>::get(); 37 return Singleton<USBMountObserver>::get();
38 } 38 }
39 void Observe(NotificationType type, 39 void Observe(NotificationType type,
40 const NotificationSource& source, 40 const NotificationSource& source,
41 const NotificationDetails& details); 41 const NotificationDetails& details);
42 42
43 void MountChanged(chromeos::MountLibrary* obj, 43 void MountChanged(chromeos::MountLibrary* obj,
44 chromeos::MountEventType evt, 44 chromeos::MountEventType evt,
45 const std::string& path); 45 const std::string& path);
46
47 void ScanForDevices(chromeos::MountLibrary* obj);
48
46 private: 49 private:
47 typedef std::vector<BrowserWithPath>::iterator BrowserIterator; 50 typedef std::vector<BrowserWithPath>::iterator BrowserIterator;
48 BrowserIterator FindBrowserForPath(const std::string& path); 51 BrowserIterator FindBrowserForPath(const std::string& path);
49 52
50 void RemoveBrowserFromVector(const std::string& path); 53 void RemoveBrowserFromVector(const std::string& path);
51 54
52 // Used to create a window of a standard size, and add it to a list 55 // Used to create a window of a standard size, and add it to a list
53 // of tracked browser windows in case that device goes away. 56 // of tracked browser windows in case that device goes away.
54 void OpenFileBrowse(const std::string& url, 57 void OpenFileBrowse(const std::string& url,
55 const std::string& device_path, 58 const std::string& device_path,
56 bool small); 59 bool small);
57 60
58 std::vector<BrowserWithPath> browsers_; 61 std::vector<BrowserWithPath> browsers_;
59 NotificationRegistrar registrar_; 62 NotificationRegistrar registrar_;
60 63
61 DISALLOW_COPY_AND_ASSIGN(USBMountObserver); 64 DISALLOW_COPY_AND_ASSIGN(USBMountObserver);
62 }; 65 };
63 66
64 } // namespace chromeos 67 } // namespace chromeos
65 #endif // CHROME_BROWSER_CHROMEOS_USB_MOUNT_OBSERVER_H_ 68 #endif // CHROME_BROWSER_CHROMEOS_USB_MOUNT_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mount_library.cc ('k') | chrome/browser/chromeos/usb_mount_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698