| 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_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ | 
| 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ | 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ | 
| 7 | 7 | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <string> | 9 #include <string> | 
| 10 #include <utility> | 10 #include <utility> | 
| 11 #include <vector> | 11 #include <vector> | 
| 12 | 12 | 
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" | 
|  | 14 #include "content/public/browser/web_contents_delegate.h" | 
| 14 #include "content/public/common/media_stream_request.h" | 15 #include "content/public/common/media_stream_request.h" | 
| 15 #include "ui/base/models/simple_menu_model.h" | 16 #include "ui/base/models/simple_menu_model.h" | 
| 16 | 17 | 
| 17 namespace content { | 18 namespace content { | 
| 18 class WebContents; | 19 class WebContents; | 
| 19 }  // namespace content | 20 }  // namespace content | 
| 20 | 21 | 
| 21 namespace gfx { | 22 namespace gfx { | 
| 22 class ImageSkia; | 23 class ImageSkia; | 
| 23 }  // namespace gfx | 24 }  // namespace gfx | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 34   MediaStreamCaptureIndicator(); | 35   MediaStreamCaptureIndicator(); | 
| 35 | 36 | 
| 36   // Overrides from SimpleMenuModel::Delegate implementation. | 37   // Overrides from SimpleMenuModel::Delegate implementation. | 
| 37   virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 38   virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 
| 38   virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 39   virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 
| 39   virtual bool GetAcceleratorForCommandId( | 40   virtual bool GetAcceleratorForCommandId( | 
| 40       int command_id, | 41       int command_id, | 
| 41       ui::Accelerator* accelerator) OVERRIDE; | 42       ui::Accelerator* accelerator) OVERRIDE; | 
| 42   virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 43   virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 
| 43 | 44 | 
|  | 45   // Called to handle access request. | 
|  | 46   void RequestAccess( | 
|  | 47       content::WebContents* web_contents, | 
|  | 48       const content::MediaStreamRequest& request, | 
|  | 49       const content::MediaResponseCallback& callback); | 
|  | 50 | 
| 44   // Called on IO thread when MediaStream opens new capture devices. | 51   // Called on IO thread when MediaStream opens new capture devices. | 
| 45   void CaptureDevicesOpened(int render_process_id, | 52   void CaptureDevicesOpened(int render_process_id, | 
| 46                             int render_view_id, | 53                             int render_view_id, | 
| 47                             const content::MediaStreamDevices& devices); | 54                             const content::MediaStreamDevices& devices); | 
| 48 | 55 | 
| 49   // Called on IO thread when MediaStream closes the opened devices. | 56   // Called on IO thread when MediaStream closes the opened devices. | 
| 50   void CaptureDevicesClosed(int render_process_id, | 57   void CaptureDevicesClosed(int render_process_id, | 
| 51                             int render_view_id, | 58                             int render_view_id, | 
| 52                             const content::MediaStreamDevices& devices); | 59                             const content::MediaStreamDevices& devices); | 
| 53 | 60 | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 144   // A vector which maps command IDs to their associated WebContents | 151   // A vector which maps command IDs to their associated WebContents | 
| 145   // instance. This is rebuilt each time the status tray icon context menu is | 152   // instance. This is rebuilt each time the status tray icon context menu is | 
| 146   // updated. | 153   // updated. | 
| 147   typedef std::vector<content::WebContents*> CommandTargets; | 154   typedef std::vector<content::WebContents*> CommandTargets; | 
| 148   CommandTargets command_targets_; | 155   CommandTargets command_targets_; | 
| 149 | 156 | 
| 150   bool should_show_balloon_; | 157   bool should_show_balloon_; | 
| 151 }; | 158 }; | 
| 152 | 159 | 
| 153 #endif  // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ | 160 #endif  // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ | 
| OLD | NEW | 
|---|