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

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

Issue 11828026: Remove DeviceAttachedIntentSource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/intents/device_attached_intent_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
deleted file mode 100644
index fa9b925877ddf57bd634928fdf0a7ced0a89cc8b..0000000000000000000000000000000000000000
--- a/chrome/browser/intents/device_attached_intent_source.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_
-#define CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_
-
-#include <map>
-#include <string>
-
-#include "base/memory/weak_ptr.h"
-#include "base/system_monitor/system_monitor.h"
-
-class Browser;
-
-namespace content {
-class WebContentsDelegate;
-}
-
-// Listens for media devices attached to the system. When such are detected,
-// translates the notification into a Web Intents dispatch.
-// The intent payload is:
-// action = "chrome-extension://attach"
-// type = "chrome-extension://filesystem"
-// 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::SupportsWeakPtr<DeviceAttachedIntentSource> {
- public:
- DeviceAttachedIntentSource(Browser* browser,
- content::WebContentsDelegate* delegate);
- virtual ~DeviceAttachedIntentSource();
-
- // base::SystemMonitor::DevicesChangedObserver implementation.
- virtual void OnRemovableStorageAttached(
- const std::string& id,
- const string16& name,
- const FilePath::StringType& location) OVERRIDE;
- virtual void OnRemovableStorageDetached(const std::string& id) OVERRIDE;
-
- // Dispatches web intents for the attached media device specified by
- // |device_info|.
- void DispatchIntentsForService(
- const base::SystemMonitor::RemovableStorageInfo& device_info);
-
- private:
- typedef std::map<std::string, base::SystemMonitor::RemovableStorageInfo>
- DeviceIdToInfoMap;
-
- // Weak pointer to browser to which intents will be dispatched.
- Browser* browser_;
- content::WebContentsDelegate* delegate_;
- DeviceIdToInfoMap device_id_map_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceAttachedIntentSource);
-};
-
-#endif // CHROME_BROWSER_INTENTS_DEVICE_ATTACHED_INTENT_SOURCE_H_
« no previous file with comments | « no previous file | chrome/browser/intents/device_attached_intent_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698