| 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 render_view_id, the WebContentsTracker | 5 // Given a starting render_process_id and render_view_id, the WebContentsTracker |
| 6 // tracks RenderViewHost instance swapping during the lifetime of a WebContents | 6 // tracks RenderViewHost instance swapping during the lifetime of a WebContents |
| 7 // instance. This is used when mirroring tab video and audio so that user | 7 // instance. This is used when mirroring tab video and audio so that user |
| 8 // navigations, crashes, etc., during a tab's lifetime allow the capturing code | 8 // navigations, crashes, etc., during a tab's lifetime allow the capturing code |
| 9 // to remain active on the current/latest RenderView. | 9 // to remain active on the current/latest RenderView. |
| 10 // | 10 // |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // |render_process_id| and |render_view_id| and begin observing it. | 66 // |render_process_id| and |render_view_id| and begin observing it. |
| 67 void LookUpAndObserveWebContents(int render_process_id, | 67 void LookUpAndObserveWebContents(int render_process_id, |
| 68 int render_view_id); | 68 int render_view_id); |
| 69 | 69 |
| 70 // WebContentsObserver overrides to react to events of interest. | 70 // WebContentsObserver overrides to react to events of interest. |
| 71 virtual void RenderViewReady() OVERRIDE; | 71 virtual void RenderViewReady() OVERRIDE; |
| 72 virtual void AboutToNavigateRenderView(RenderViewHost* render_view_host) | 72 virtual void AboutToNavigateRenderView(RenderViewHost* render_view_host) |
| 73 OVERRIDE; | 73 OVERRIDE; |
| 74 virtual void DidNavigateMainFrame(const LoadCommittedDetails& details, | 74 virtual void DidNavigateMainFrame(const LoadCommittedDetails& details, |
| 75 const FrameNavigateParams& params) OVERRIDE; | 75 const FrameNavigateParams& params) OVERRIDE; |
| 76 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; | 76 virtual void WebContentsDestroyed() OVERRIDE; |
| 77 | 77 |
| 78 scoped_refptr<base::MessageLoopProxy> message_loop_; | 78 scoped_refptr<base::MessageLoopProxy> message_loop_; |
| 79 ChangeCallback callback_; | 79 ChangeCallback callback_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(WebContentsTracker); | 81 DISALLOW_COPY_AND_ASSIGN(WebContentsTracker); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace content | 84 } // namespace content |
| 85 | 85 |
| 86 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_TRACKER_H_ | 86 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_TRACKER_H_ |
| OLD | NEW |