Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: chromecast/browser/cast_content_window.cc

Issue 1037593003: Propagate media play/pause to WebContentsObserver for Chromecast metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renamed observer methods Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_window.h ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698