| 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> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 public: | 34 public: |
| 35 MediaStreamCaptureIndicator(); | 35 MediaStreamCaptureIndicator(); |
| 36 | 36 |
| 37 // Registers a new media stream for |web_contents| and returns UI object | 37 // Registers a new media stream for |web_contents| and returns UI object |
| 38 // that's used by the content layer to notify about state of the stream. | 38 // that's used by the content layer to notify about state of the stream. |
| 39 scoped_ptr<content::MediaStreamUI> RegisterMediaStream( | 39 scoped_ptr<content::MediaStreamUI> RegisterMediaStream( |
| 40 content::WebContents* web_contents, | 40 content::WebContents* web_contents, |
| 41 const content::MediaStreamDevices& devices); | 41 const content::MediaStreamDevices& devices); |
| 42 | 42 |
| 43 // Overrides from StatusIconMenuModel::Delegate implementation. | 43 // Overrides from StatusIconMenuModel::Delegate implementation. |
| 44 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 44 virtual void ExecuteCommand(int command_id, int event_flags) override; |
| 45 | 45 |
| 46 // Returns true if the |web_contents| is capturing user media (e.g., webcam or | 46 // Returns true if the |web_contents| is capturing user media (e.g., webcam or |
| 47 // microphone input). | 47 // microphone input). |
| 48 bool IsCapturingUserMedia(content::WebContents* web_contents) const; | 48 bool IsCapturingUserMedia(content::WebContents* web_contents) const; |
| 49 | 49 |
| 50 // Returns true if the |web_contents| is capturing video (e.g., webcam). | 50 // Returns true if the |web_contents| is capturing video (e.g., webcam). |
| 51 bool IsCapturingVideo(content::WebContents* web_contents) const; | 51 bool IsCapturingVideo(content::WebContents* web_contents) const; |
| 52 | 52 |
| 53 // Returns true if the |web_contents| is capturing audio (e.g., microphone). | 53 // Returns true if the |web_contents| is capturing audio (e.g., microphone). |
| 54 bool IsCapturingAudio(content::WebContents* web_contents) const; | 54 bool IsCapturingAudio(content::WebContents* web_contents) const; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 UsageMap usage_map_; | 100 UsageMap usage_map_; |
| 101 | 101 |
| 102 // A vector which maps command IDs to their associated WebContents | 102 // A vector which maps command IDs to their associated WebContents |
| 103 // instance. This is rebuilt each time the status tray icon context menu is | 103 // instance. This is rebuilt each time the status tray icon context menu is |
| 104 // updated. | 104 // updated. |
| 105 typedef std::vector<content::WebContents*> CommandTargets; | 105 typedef std::vector<content::WebContents*> CommandTargets; |
| 106 CommandTargets command_targets_; | 106 CommandTargets command_targets_; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ | 109 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ |
| OLD | NEW |