Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / browser / renderer_host / media / media_stream_manager.h
index 17bc6d2..2d0a56f 100644 (file)
@@ -17,6 +17,9 @@
 // 5. MediaStreamManager will call the proper media device manager to open the
 //    device and let the MediaStreamRequester know it has been done.
 
+// If either user or test harness selects --use-fake-device-for-media-stream,
+// a fake video device or devices are used instead of real ones.
+
 // When enumeration and open are done in separate operations,
 // MediaStreamUIController is not involved as in steps.
 
@@ -145,6 +148,16 @@ class CONTENT_EXPORT MediaStreamManager
                   MediaStreamType type,
                   const GURL& security_origin);
 
+  // Finds and returns the device id corresponding to the given
+  // |source_id|. Returns true if there was a raw device id that matched the
+  // given |source_id|, false if nothing matched it.
+  bool TranslateSourceIdToDeviceId(
+      MediaStreamType stream_type,
+      const ResourceContext::SaltCallback& rc,
+      const GURL& security_origin,
+      const std::string& source_id,
+      std::string* device_id) const;
+
   // Called by UI to make sure the device monitor is started so that UI receive
   // notifications about device changes.
   void EnsureDeviceMonitorStarted();
@@ -156,16 +169,13 @@ class CONTENT_EXPORT MediaStreamManager
                       int capture_session_id) OVERRIDE;
   virtual void DevicesEnumerated(MediaStreamType stream_type,
                                  const StreamDeviceInfoArray& devices) OVERRIDE;
+  virtual void Aborted(MediaStreamType stream_type,
+                       int capture_session_id) OVERRIDE;
 
   // Implements base::SystemMonitor::DevicesChangedObserver.
   virtual void OnDevicesChanged(
       base::SystemMonitor::DeviceType device_type) OVERRIDE;
 
-  // Used by unit test to make sure fake devices are used instead of a real
-  // devices, which is needed for server based testing or certain tests (which
-  // can pass --use-fake-device-for-media-stream).
-  void UseFakeDevice();
-
   // Called by the tests to specify a fake UI that should be used for next
   // generated stream (or when using --use-fake-ui-for-media-stream).
   void UseFakeUI(scoped_ptr<FakeMediaStreamUIProxy> fake_ui);
@@ -335,16 +345,6 @@ class CONTENT_EXPORT MediaStreamManager
   void AddLogMessageOnUIThread(const std::set<int>& render_process_ids,
                                const std::string& message);
 
-  // Finds and returns the device id corresponding to the given
-  // |source_id|. Returns true if there was a raw device id that matched the
-  // given |source_id|, false if nothing matched it.
-  bool TranslateSourceIdToDeviceId(
-      MediaStreamType stream_type,
-      const ResourceContext::SaltCallback& rc,
-      const GURL& security_origin,
-      const std::string& source_id,
-      std::string* device_id) const;
-
   // Handles the callback from MediaStreamUIProxy to receive the UI window id,
   // used for excluding the notification window in desktop capturing.
   void OnMediaStreamUIWindowId(MediaStreamType video_type,