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 "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 content::WebContents* web_contents = content::WebContents::Create( | 112 content::WebContents* web_contents = content::WebContents::Create( |
113 create_params); | 113 create_params); |
114 content::WebContentsObserver::Observe(web_contents); | 114 content::WebContentsObserver::Observe(web_contents); |
115 return make_scoped_ptr(web_contents); | 115 return make_scoped_ptr(web_contents); |
116 } | 116 } |
117 | 117 |
118 void CastContentWindow::DidFirstVisuallyNonEmptyPaint() { | 118 void CastContentWindow::DidFirstVisuallyNonEmptyPaint() { |
119 metrics::CastMetricsHelper::GetInstance()->LogTimeToFirstPaint(); | 119 metrics::CastMetricsHelper::GetInstance()->LogTimeToFirstPaint(); |
120 } | 120 } |
121 | 121 |
| 122 void CastContentWindow::MediaPaused() { |
| 123 metrics::CastMetricsHelper::GetInstance()->LogMediaPause(); |
| 124 } |
| 125 |
| 126 void CastContentWindow::MediaStartedPlaying() { |
| 127 metrics::CastMetricsHelper::GetInstance()->LogMediaPlay(); |
| 128 } |
| 129 |
122 } // namespace chromecast | 130 } // namespace chromecast |
OLD | NEW |