Chromium Code Reviews| Index: content/browser/android/content_video_view.cc |
| diff --git a/content/browser/android/content_video_view.cc b/content/browser/android/content_video_view.cc |
| index 82f496670b9f7d8e8d3e617d055ea1558db992c8..342a140e3ce3f0e0647676df2fb12a438ed3878b 100644 |
| --- a/content/browser/android/content_video_view.cc |
| +++ b/content/browser/android/content_video_view.cc |
| @@ -262,18 +262,19 @@ JavaObjectWeakGlobalRef ContentVideoView::CreateJavaObject() { |
| } |
| void ContentVideoView::CreatePowerSaveBlocker() { |
| - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kDisableOverlayFullscreenVideoSubtitle)) { |
| - return; |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
|
Ignacio Solla
2014/09/25 10:36:02
Some context: kDisableOverlayFullscreenVideoSubtit
|
| + switches::kEnableContentVideoViewPowerSaveBlocker)) { |
| + // In fullscreen Clank reuses the power save blocker attached to the |
| + // container view that was created for embedded video. The WebView cannot |
| + // reuse that so we create a new blocker instead. |
| + if (power_save_blocker_) return; |
| + |
| + power_save_blocker_ = PowerSaveBlocker::Create( |
| + PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, |
| + "Playing video").Pass(); |
| + static_cast<PowerSaveBlockerImpl*>(power_save_blocker_.get())-> |
| + InitDisplaySleepBlocker(GetNativeView()); |
| } |
| - |
| - if (power_save_blocker_) return; |
| - |
| - power_save_blocker_ = PowerSaveBlocker::Create( |
| - PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, |
| - "Playing video").Pass(); |
| - static_cast<PowerSaveBlockerImpl*>(power_save_blocker_.get())-> |
| - InitDisplaySleepBlocker(GetNativeView()); |
| } |
| } // namespace content |