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 // Given a starting render_process_id and main_render_frame_id, the | 5 // Given a starting render_process_id and main_render_frame_id, the |
6 // WebContentsTracker tracks changes to the active RenderFrameHost tree during | 6 // WebContentsTracker tracks changes to the active RenderFrameHost tree during |
7 // the lifetime of a WebContents instance. This is used when mirroring tab | 7 // the lifetime of a WebContents instance. This is used when mirroring tab |
8 // video and audio so that user navigations, crashes, iframes, etc., during a | 8 // video and audio so that user navigations, crashes, iframes, etc., during a |
9 // tab's lifetime allow the capturing code to remain active on the | 9 // tab's lifetime allow the capturing code to remain active on the |
10 // current/latest render frame tree. | 10 // current/latest render frame tree. |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // WebContentsObserver override to notify the client that the source size has | 101 // WebContentsObserver override to notify the client that the source size has |
102 // changed. | 102 // changed. |
103 void MainFrameWasResized(bool width_changed) override; | 103 void MainFrameWasResized(bool width_changed) override; |
104 | 104 |
105 // WebContentsObserver override to notify the client that the capture target | 105 // WebContentsObserver override to notify the client that the capture target |
106 // has been permanently lost. | 106 // has been permanently lost. |
107 void WebContentsDestroyed() override; | 107 void WebContentsDestroyed() override; |
108 | 108 |
109 // WebContentsObserver overrides to notify the client that the capture target | 109 // WebContentsObserver overrides to notify the client that the capture target |
110 // may have changed due to a separate fullscreen widget shown/destroyed. | 110 // may have changed due to a separate fullscreen widget shown/destroyed. |
111 void DidShowFullscreenWidget(int routing_id) override; | 111 void DidShowFullscreenWidget() override; |
112 void DidDestroyFullscreenWidget(int routing_id) override; | 112 void DidDestroyFullscreenWidget() override; |
113 | 113 |
114 // If true, the client is interested in the showing/destruction of fullscreen | 114 // If true, the client is interested in the showing/destruction of fullscreen |
115 // RenderWidgetHosts. | 115 // RenderWidgetHosts. |
116 const bool track_fullscreen_rwh_; | 116 const bool track_fullscreen_rwh_; |
117 | 117 |
118 // TaskRunner corresponding to the thread that called Start(). | 118 // TaskRunner corresponding to the thread that called Start(). |
119 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 119 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
120 | 120 |
121 // Callback to run when the target RenderWidgetHost has changed. | 121 // Callback to run when the target RenderWidgetHost has changed. |
122 ChangeCallback callback_; | 122 ChangeCallback callback_; |
123 | 123 |
124 // Pointer to the RenderWidgetHost provided in the last run of |callback_|. | 124 // Pointer to the RenderWidgetHost provided in the last run of |callback_|. |
125 // This is used to eliminate duplicate callback runs. | 125 // This is used to eliminate duplicate callback runs. |
126 RenderWidgetHost* last_target_; | 126 RenderWidgetHost* last_target_; |
127 | 127 |
128 // Callback to run when the target RenderWidgetHost has resized. | 128 // Callback to run when the target RenderWidgetHost has resized. |
129 base::Closure resize_callback_; | 129 base::Closure resize_callback_; |
130 | 130 |
131 DISALLOW_COPY_AND_ASSIGN(WebContentsTracker); | 131 DISALLOW_COPY_AND_ASSIGN(WebContentsTracker); |
132 }; | 132 }; |
133 | 133 |
134 } // namespace content | 134 } // namespace content |
135 | 135 |
136 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_TRACKER_H_ | 136 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_TRACKER_H_ |
OLD | NEW |