OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/power_monitor/power_observer.h" | 11 #include "base/power_monitor/power_observer.h" |
| 12 #include "base/synchronization/lock.h" |
12 #include "content/public/browser/browser_message_filter.h" | 13 #include "content/public/browser/browser_message_filter.h" |
13 | 14 |
14 struct PeerConnectionInfo; | 15 struct PeerConnectionInfo; |
| 16 struct VideoInfo; |
15 | 17 |
16 namespace base { | 18 namespace base { |
17 class ListValue; | 19 class ListValue; |
18 } // namespace base | 20 } // namespace base |
19 | 21 |
20 namespace content { | 22 namespace content { |
21 | 23 |
22 class WebRTCEventLogHost; | 24 class WebRTCEventLogHost; |
23 | 25 |
24 // This class is the host for PeerConnectionTracker in the browser process | 26 // This class is the host for PeerConnectionTracker in the browser process |
(...skipping 22 matching lines...) Expand all Loading... |
47 | 49 |
48 private: | 50 private: |
49 // Handlers for peer connection messages coming from the renderer. | 51 // Handlers for peer connection messages coming from the renderer. |
50 void OnAddPeerConnection(const PeerConnectionInfo& info); | 52 void OnAddPeerConnection(const PeerConnectionInfo& info); |
51 void OnRemovePeerConnection(int lid); | 53 void OnRemovePeerConnection(int lid); |
52 void OnUpdatePeerConnection( | 54 void OnUpdatePeerConnection( |
53 int lid, const std::string& type, const std::string& value); | 55 int lid, const std::string& type, const std::string& value); |
54 void OnAddStats(int lid, const base::ListValue& value); | 56 void OnAddStats(int lid, const base::ListValue& value); |
55 void OnGetUserMedia(const std::string& origin, | 57 void OnGetUserMedia(const std::string& origin, |
56 bool audio, | 58 bool audio, |
57 bool video, | 59 const VideoInfo& video_info, |
58 const std::string& audio_constraints, | 60 const std::string& audio_constraints, |
59 const std::string& video_constraints); | 61 const std::string& video_constraints); |
60 void SendOnSuspendOnUIThread(); | 62 void SendOnSuspendOnUIThread(); |
| 63 bool IsScreenCapture(const std::string& video_constraints); |
61 | 64 |
62 int render_process_id_; | 65 int render_process_id_; |
| 66 bool is_screen_capture_; |
63 | 67 |
| 68 base::Lock lock_; |
64 base::WeakPtr<WebRTCEventLogHost> event_log_host_; | 69 base::WeakPtr<WebRTCEventLogHost> event_log_host_; |
65 | 70 |
66 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTrackerHost); | 71 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTrackerHost); |
67 }; | 72 }; |
68 | 73 |
69 } // namespace content | 74 } // namespace content |
70 | 75 |
71 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ | 76 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ |
OLD | NEW |