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_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_ |
6 #define CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_ | 6 #define CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_ |
7 | 7 |
8 #include "base/system_monitor/system_monitor.h" | 8 #include "base/system_monitor/system_monitor.h" |
9 | 9 |
10 class Browser; | 10 class Browser; |
(...skipping 15 matching lines...) Expand all Loading... |
26 DeviceAttachedIntentSource(Browser* browser, | 26 DeviceAttachedIntentSource(Browser* browser, |
27 content::WebContentsDelegate* delegate); | 27 content::WebContentsDelegate* delegate); |
28 virtual ~DeviceAttachedIntentSource(); | 28 virtual ~DeviceAttachedIntentSource(); |
29 | 29 |
30 // base::SystemMonitor::DevicesChangedObserver implementation. | 30 // base::SystemMonitor::DevicesChangedObserver implementation. |
31 virtual void OnMediaDeviceAttached( | 31 virtual void OnMediaDeviceAttached( |
32 const std::string& id, | 32 const std::string& id, |
33 const string16& name, | 33 const string16& name, |
34 base::SystemMonitor::MediaDeviceType type, | 34 base::SystemMonitor::MediaDeviceType type, |
35 const FilePath::StringType& location) OVERRIDE; | 35 const FilePath::StringType& location) OVERRIDE; |
| 36 virtual void OnMediaDeviceDetached(const std::string& id) OVERRIDE; |
36 | 37 |
37 private: | 38 private: |
| 39 typedef std::map<std::string, base::SystemMonitor::MediaDeviceInfo> |
| 40 DeviceIdToInfoMap; |
| 41 |
38 // Weak pointer to browser to which intents will be dispatched. | 42 // Weak pointer to browser to which intents will be dispatched. |
39 Browser* browser_; | 43 Browser* browser_; |
40 content::WebContentsDelegate* delegate_; | 44 content::WebContentsDelegate* delegate_; |
| 45 DeviceIdToInfoMap device_id_map_; |
41 | 46 |
42 DISALLOW_COPY_AND_ASSIGN(DeviceAttachedIntentSource); | 47 DISALLOW_COPY_AND_ASSIGN(DeviceAttachedIntentSource); |
43 }; | 48 }; |
44 | 49 |
45 #endif // CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_ | 50 #endif // CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_ |
OLD | NEW |