| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind( | 478 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind( |
| 479 &AuraWindowCaptureMachine::UpdateCaptureSize, | 479 &AuraWindowCaptureMachine::UpdateCaptureSize, |
| 480 weak_factory_.GetWeakPtr())); | 480 weak_factory_.GetWeakPtr())); |
| 481 } | 481 } |
| 482 | 482 |
| 483 void AuraWindowCaptureMachine::OnWindowDestroying(aura::Window* window) { | 483 void AuraWindowCaptureMachine::OnWindowDestroying(aura::Window* window) { |
| 484 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 484 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 485 | 485 |
| 486 InternalStop(base::Bind(&base::DoNothing)); | 486 InternalStop(base::Bind(&base::DoNothing)); |
| 487 | 487 |
| 488 oracle_proxy_->ReportError("OnWindowDestroying()"); | 488 oracle_proxy_->ReportError(FROM_HERE, "OnWindowDestroying()"); |
| 489 } | 489 } |
| 490 | 490 |
| 491 void AuraWindowCaptureMachine::OnWindowAddedToRootWindow( | 491 void AuraWindowCaptureMachine::OnWindowAddedToRootWindow( |
| 492 aura::Window* window) { | 492 aura::Window* window) { |
| 493 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 493 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 494 DCHECK(window == desktop_window_); | 494 DCHECK(window == desktop_window_); |
| 495 | 495 |
| 496 window->GetHost()->compositor()->AddObserver(this); | 496 window->GetHost()->compositor()->AddObserver(this); |
| 497 } | 497 } |
| 498 | 498 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 512 // TODO(miu): The CopyOutputRequest should be made earlier, at WillCommit(). | 512 // TODO(miu): The CopyOutputRequest should be made earlier, at WillCommit(). |
| 513 // http://crbug.com/492839 | 513 // http://crbug.com/492839 |
| 514 BrowserThread::PostTask( | 514 BrowserThread::PostTask( |
| 515 BrowserThread::UI, | 515 BrowserThread::UI, |
| 516 FROM_HERE, | 516 FROM_HERE, |
| 517 base::Bind(&AuraWindowCaptureMachine::Capture, weak_factory_.GetWeakPtr(), | 517 base::Bind(&AuraWindowCaptureMachine::Capture, weak_factory_.GetWeakPtr(), |
| 518 true)); | 518 true)); |
| 519 } | 519 } |
| 520 | 520 |
| 521 } // namespace content | 521 } // namespace content |
| OLD | NEW |