| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chromecast/browser/cast_content_window.h" | 5 #include "chromecast/browser/cast_content_window.h" |
| 6 | 6 |
| 7 #include "base/threading/thread_restrictions.h" | 7 #include "base/threading/thread_restrictions.h" |
| 8 #include "chromecast/base/metrics/cast_metrics_helper.h" | 8 #include "chromecast/base/metrics/cast_metrics_helper.h" |
| 9 #include "chromecast/browser/cast_browser_process.h" | 9 #include "chromecast/browser/cast_browser_process.h" |
| 10 #include "chromecast/media/base/video_plane_controller.h" | 10 #include "chromecast/media/base/video_plane_controller.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 content::WebContents* web_contents = content::WebContents::Create( | 115 content::WebContents* web_contents = content::WebContents::Create( |
| 116 create_params); | 116 create_params); |
| 117 content::WebContentsObserver::Observe(web_contents); | 117 content::WebContentsObserver::Observe(web_contents); |
| 118 return make_scoped_ptr(web_contents); | 118 return make_scoped_ptr(web_contents); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void CastContentWindow::DidFirstVisuallyNonEmptyPaint() { | 121 void CastContentWindow::DidFirstVisuallyNonEmptyPaint() { |
| 122 metrics::CastMetricsHelper::GetInstance()->LogTimeToFirstPaint(); | 122 metrics::CastMetricsHelper::GetInstance()->LogTimeToFirstPaint(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void CastContentWindow::MediaPaused() { | 125 void CastContentWindow::MediaStoppedPlaying(const MediaPlayerId& id) { |
| 126 metrics::CastMetricsHelper::GetInstance()->LogMediaPause(); | 126 metrics::CastMetricsHelper::GetInstance()->LogMediaPause(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void CastContentWindow::MediaStartedPlaying() { | 129 void CastContentWindow::MediaStartedPlaying(const MediaPlayerId& id) { |
| 130 metrics::CastMetricsHelper::GetInstance()->LogMediaPlay(); | 130 metrics::CastMetricsHelper::GetInstance()->LogMediaPlay(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void CastContentWindow::RenderViewCreated( | 133 void CastContentWindow::RenderViewCreated( |
| 134 content::RenderViewHost* render_view_host) { | 134 content::RenderViewHost* render_view_host) { |
| 135 content::RenderWidgetHostView* view = | 135 content::RenderWidgetHostView* view = |
| 136 render_view_host->GetWidget()->GetView(); | 136 render_view_host->GetWidget()->GetView(); |
| 137 if (view) | 137 if (view) |
| 138 view->SetBackgroundColor(transparent_ ? SK_ColorTRANSPARENT | 138 view->SetBackgroundColor(transparent_ ? SK_ColorTRANSPARENT |
| 139 : SK_ColorBLACK); | 139 : SK_ColorBLACK); |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace shell | 142 } // namespace shell |
| 143 } // namespace chromecast | 143 } // namespace chromecast |
| OLD | NEW |