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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Called on IO thread when MediaStream opens new capture devices. | 38 // Called on IO thread when MediaStream opens new capture devices. |
39 void CaptureDevicesOpened(int render_process_id, | 39 void CaptureDevicesOpened(int render_process_id, |
40 int render_view_id, | 40 int render_view_id, |
41 const content::MediaStreamDevices& devices); | 41 const content::MediaStreamDevices& devices); |
42 | 42 |
43 // Called on IO thread when MediaStream closes the opened devices. | 43 // Called on IO thread when MediaStream closes the opened devices. |
44 void CaptureDevicesClosed(int render_process_id, | 44 void CaptureDevicesClosed(int render_process_id, |
45 int render_view_id, | 45 int render_view_id, |
46 const content::MediaStreamDevices& devices); | 46 const content::MediaStreamDevices& devices); |
47 | 47 |
| 48 // Returns true if the render process is capturing media. |
| 49 bool IsProcessCapturing(int render_process_id, int render_view_id) const; |
| 50 |
48 // ImageLoadingTracker::Observer implementation. | 51 // ImageLoadingTracker::Observer implementation. |
49 virtual void OnImageLoaded(const gfx::Image& image, | 52 virtual void OnImageLoaded(const gfx::Image& image, |
50 const std::string& extension_id, | 53 const std::string& extension_id, |
51 int index) OVERRIDE; | 54 int index) OVERRIDE; |
52 | 55 |
53 private: | 56 private: |
54 // Struct to store the usage information of the capture devices for each tab. | 57 // Struct to store the usage information of the capture devices for each tab. |
55 // TODO(estade): this should be called CaptureDeviceContents; not all the | 58 // TODO(estade): this should be called CaptureDeviceContents; not all the |
56 // render views it represents are tabs. | 59 // render views it represents are tabs. |
57 struct CaptureDeviceTab { | 60 struct CaptureDeviceTab { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Tracks the load of extension icons. | 150 // Tracks the load of extension icons. |
148 scoped_ptr<ImageLoadingTracker> tracker_; | 151 scoped_ptr<ImageLoadingTracker> tracker_; |
149 // The messages to display when extension images are loaded. The index | 152 // The messages to display when extension images are loaded. The index |
150 // corresponds to the index of the associated LoadImage request. | 153 // corresponds to the index of the associated LoadImage request. |
151 std::map<int, string16> pending_messages_; | 154 std::map<int, string16> pending_messages_; |
152 // Tracks the number of requests to |tracker_|. | 155 // Tracks the number of requests to |tracker_|. |
153 int request_index_; | 156 int request_index_; |
154 }; | 157 }; |
155 | 158 |
156 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ | 159 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ |
OLD | NEW |