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

Unified Diff: chromecast/renderer/cast_media_load_deferrer.cc

Issue 824733002: Support for defered media load to cast_content_render_client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New metrics. Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/renderer/cast_media_load_deferrer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/renderer/cast_media_load_deferrer.cc
diff --git a/chromecast/renderer/cast_media_load_deferrer.cc b/chromecast/renderer/cast_media_load_deferrer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0f84657ce70ae5db3db51360a715a31dd2b97079
--- /dev/null
+++ b/chromecast/renderer/cast_media_load_deferrer.cc
@@ -0,0 +1,27 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromecast/renderer/cast_media_load_deferrer.h"
+
+#include "base/callback_helpers.h"
+#include "base/logging.h"
+
+namespace chromecast {
+
+CastMediaLoadDeferrer::CastMediaLoadDeferrer(
+ content::RenderFrame* render_frame,
+ const base::Closure& continue_loading_cb)
+ : content::RenderFrameObserver(render_frame),
+ continue_loading_cb_(continue_loading_cb) {
+ DCHECK(!continue_loading_cb_.is_null());
+}
+
+CastMediaLoadDeferrer::~CastMediaLoadDeferrer() {}
+
+void CastMediaLoadDeferrer::WasShown() {
+ continue_loading_cb_.Run();
+ delete this;
+}
+
+} // namespace chromecast
« no previous file with comments | « chromecast/renderer/cast_media_load_deferrer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698