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

Side by Side Diff: chrome/browser/intents/device_attached_intent_source.h

Issue 10781014: Isolated FS for media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Device intent source (media detach notification) Created 8 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_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
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;
kmadhusu 2012/08/01 23:39:35 thestig@: Since the detach notification didn't ha
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698