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

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

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(new device::PowerSaveBlocker( 88 power_save_blocker_.reset(new device::PowerSaveBlocker(
89 device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, 89 device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep,
90 device::PowerSaveBlocker::kReasonOther, "DesktopCaptureDevice is running", 90 device::PowerSaveBlocker::kReasonOther, "DesktopCaptureDevice is running",
91 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 91 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
92 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); 92 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
93 93
94 return true; 94 return true;
95 } 95 }
96 96
97 void AuraWindowCaptureMachine::Stop(const base::Closure& callback) { 97 void AuraWindowCaptureMachine::Stop(const base::Closure& callback) {
98 // Stops the capture machine asynchronously. 98 // Stops the capture machine asynchronously.
99 BrowserThread::PostTask( 99 BrowserThread::PostTask(
100 BrowserThread::UI, FROM_HERE, base::Bind( 100 BrowserThread::UI, FROM_HERE, base::Bind(
101 &AuraWindowCaptureMachine::InternalStop, 101 &AuraWindowCaptureMachine::InternalStop,
102 base::Unretained(this), 102 base::Unretained(this),
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 Capture(timestamp); 411 Capture(timestamp);
412 } 412 }
413 413
414 void AuraWindowCaptureMachine::OnCompositingShuttingDown( 414 void AuraWindowCaptureMachine::OnCompositingShuttingDown(
415 ui::Compositor* compositor) { 415 ui::Compositor* compositor) {
416 DCHECK_CURRENTLY_ON(BrowserThread::UI); 416 DCHECK_CURRENTLY_ON(BrowserThread::UI);
417 compositor->RemoveAnimationObserver(this); 417 compositor->RemoveAnimationObserver(this);
418 } 418 }
419 419
420 } // namespace content 420 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/android/browser_demuxer_android.cc ('k') | content/browser/media/capture/desktop_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698