OLD | NEW |
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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 bool result) { | 359 bool result) { |
360 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 360 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
361 | 361 |
362 release_callback->Run(gpu::SyncToken(), false); | 362 release_callback->Run(gpu::SyncToken(), false); |
363 | 363 |
364 // Render the cursor and deliver the captured frame if the | 364 // Render the cursor and deliver the captured frame if the |
365 // AuraWindowCaptureMachine has not been stopped (i.e., the WeakPtr is | 365 // AuraWindowCaptureMachine has not been stopped (i.e., the WeakPtr is |
366 // still valid). | 366 // still valid). |
367 if (machine) { | 367 if (machine) { |
368 if (machine->cursor_renderer_ && result) | 368 if (machine->cursor_renderer_ && result) |
369 machine->cursor_renderer_->RenderOnVideoFrame(target); | 369 machine->cursor_renderer_->RenderOnVideoFrame(target.get()); |
370 } else { | 370 } else { |
371 VLOG(1) << "Aborting capture: AuraWindowCaptureMachine has gone away."; | 371 VLOG(1) << "Aborting capture: AuraWindowCaptureMachine has gone away."; |
372 result = false; | 372 result = false; |
373 } | 373 } |
374 | 374 |
375 capture_frame_cb.Run(std::move(target), event_time, result); | 375 capture_frame_cb.Run(std::move(target), event_time, result); |
376 } | 376 } |
377 | 377 |
378 void AuraWindowCaptureMachine::OnWindowBoundsChanged( | 378 void AuraWindowCaptureMachine::OnWindowBoundsChanged( |
379 aura::Window* window, | 379 aura::Window* window, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 Capture(timestamp); | 440 Capture(timestamp); |
441 } | 441 } |
442 | 442 |
443 void AuraWindowCaptureMachine::OnCompositingShuttingDown( | 443 void AuraWindowCaptureMachine::OnCompositingShuttingDown( |
444 ui::Compositor* compositor) { | 444 ui::Compositor* compositor) { |
445 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 445 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
446 compositor->RemoveAnimationObserver(this); | 446 compositor->RemoveAnimationObserver(this); |
447 } | 447 } |
448 | 448 |
449 } // namespace content | 449 } // namespace content |
OLD | NEW |