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

Unified Diff: chrome/browser/intents/device_attached_intent_source.h

Issue 10831147: Show device attach web intent picker dialog only if we have registered services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/intents/device_attached_intent_source.h
diff --git a/chrome/browser/intents/device_attached_intent_source.h b/chrome/browser/intents/device_attached_intent_source.h
index f8c914c0b4988e5ae7f8541ec5b9e35e3cf5e05e..99fb7b97d5694a16f8955c4bd26887398710ac37 100644
--- a/chrome/browser/intents/device_attached_intent_source.h
+++ b/chrome/browser/intents/device_attached_intent_source.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_
#define CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_
+#include "base/memory/weak_ptr.h"
#include "base/system_monitor/system_monitor.h"
class Browser;
@@ -21,7 +22,8 @@ class WebContentsDelegate;
// root_path = the File Path at which the device is accessible
// filesystem_id = registered isolated file system identifier
class DeviceAttachedIntentSource
- : public base::SystemMonitor::DevicesChangedObserver {
+ : public base::SystemMonitor::DevicesChangedObserver,
+ public base::SupportsWeakPtr<DeviceAttachedIntentSource> {
James Hawkins 2012/08/06 16:36:36 Use WeakPtrFactory instead.
kmadhusu 2012/08/06 18:11:52 As per the comments in base/memory/weak_ptr.h, We
public:
DeviceAttachedIntentSource(Browser* browser,
content::WebContentsDelegate* delegate);
@@ -35,6 +37,11 @@ class DeviceAttachedIntentSource
const FilePath::StringType& location) OVERRIDE;
virtual void OnMediaDeviceDetached(const std::string& id) OVERRIDE;
+ // Dispatches web intents for the attached media device specified by
+ // |device_info|.
+ void DispatchIntentsForService(
+ const base::SystemMonitor::MediaDeviceInfo& device_info);
+
private:
typedef std::map<std::string, base::SystemMonitor::MediaDeviceInfo>
DeviceIdToInfoMap;

Powered by Google App Engine
This is Rietveld 408576698