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

Unified Diff: chrome/browser/media/cast_transport_host_filter.h

Issue 448953002: Impose PowerSaveBlock while remoting content via Cast or WebRTC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/media/cast_transport_host_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/cast_transport_host_filter.h
diff --git a/chrome/browser/media/cast_transport_host_filter.h b/chrome/browser/media/cast_transport_host_filter.h
index 2fd8450e6a0807187142ec898ef969633b6be8b0..147d0a18d16d7320c0e0848921a9e02c0fab8d47 100644
--- a/chrome/browser/media/cast_transport_host_filter.h
+++ b/chrome/browser/media/cast_transport_host_filter.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_
#include "base/id_map.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/default_tick_clock.h"
#include "chrome/common/cast_messages.h"
@@ -14,6 +15,10 @@
#include "media/cast/logging/logging_defines.h"
#include "media/cast/net/cast_transport_sender.h"
+namespace content {
+class PowerSaveBlocker;
+} // namespace content
+
namespace cast {
class CastTransportHostFilter : public content::BrowserMessageFilter {
@@ -76,6 +81,11 @@ class CastTransportHostFilter : public content::BrowserMessageFilter {
// Clock used by Cast transport.
base::DefaultTickClock clock_;
+ // While |id_map_| is non-empty, hold an instance of
+ // content::PowerSaveBlocker. This prevents Chrome from being suspended while
+ // remoting content.
+ scoped_ptr<content::PowerSaveBlocker> power_save_blocker_;
+
base::WeakPtrFactory<CastTransportHostFilter> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(CastTransportHostFilter);
« no previous file with comments | « no previous file | chrome/browser/media/cast_transport_host_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698