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

Side by Side Diff: content/browser/media/capture/aura_window_capture_machine.cc

Issue 1999953002: Move content/browser/power_save_blocker to //device/power_save_blocker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@power-save-next-2
Patch Set: . Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/media/capture/aura_window_capture_machine.h" 5 #include "content/browser/media/capture/aura_window_capture_machine.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Start observing compositor updates. 81 // Start observing compositor updates.
82 aura::WindowTreeHost* const host = desktop_window_->GetHost(); 82 aura::WindowTreeHost* const host = desktop_window_->GetHost();
83 ui::Compositor* const compositor = host ? host->compositor() : nullptr; 83 ui::Compositor* const compositor = host ? host->compositor() : nullptr;
84 if (!compositor) 84 if (!compositor)
85 return false; 85 return false;
86 compositor->AddAnimationObserver(this); 86 compositor->AddAnimationObserver(this);
87 87
88 power_save_blocker_.reset( 88 power_save_blocker_.reset(
89 CreatePowerSaveBlocker( 89 CreatePowerSaveBlocker(
90 PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, 90 device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep,
91 PowerSaveBlocker::kReasonOther, "DesktopCaptureDevice is running") 91 device::PowerSaveBlocker::kReasonOther,
92 "DesktopCaptureDevice is running")
92 .release()); 93 .release());
93 94
94 return true; 95 return true;
95 } 96 }
96 97
97 void AuraWindowCaptureMachine::Stop(const base::Closure& callback) { 98 void AuraWindowCaptureMachine::Stop(const base::Closure& callback) {
98 // Stops the capture machine asynchronously. 99 // Stops the capture machine asynchronously.
99 BrowserThread::PostTask( 100 BrowserThread::PostTask(
100 BrowserThread::UI, FROM_HERE, base::Bind( 101 BrowserThread::UI, FROM_HERE, base::Bind(
101 &AuraWindowCaptureMachine::InternalStop, 102 &AuraWindowCaptureMachine::InternalStop,
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 Capture(timestamp); 412 Capture(timestamp);
412 } 413 }
413 414
414 void AuraWindowCaptureMachine::OnCompositingShuttingDown( 415 void AuraWindowCaptureMachine::OnCompositingShuttingDown(
415 ui::Compositor* compositor) { 416 ui::Compositor* compositor) {
416 DCHECK_CURRENTLY_ON(BrowserThread::UI); 417 DCHECK_CURRENTLY_ON(BrowserThread::UI);
417 compositor->RemoveAnimationObserver(this); 418 compositor->RemoveAnimationObserver(this);
418 } 419 }
419 420
420 } // namespace content 421 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698