| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 scoped_refptr<CompositorLock> RootWindow::GetCompositorLock() { | 525 scoped_refptr<CompositorLock> RootWindow::GetCompositorLock() { |
| 526 if (!compositor_lock_) | 526 if (!compositor_lock_) |
| 527 compositor_lock_ = new CompositorLock(this); | 527 compositor_lock_ = new CompositorLock(this); |
| 528 return compositor_lock_; | 528 return compositor_lock_; |
| 529 } | 529 } |
| 530 | 530 |
| 531 void RootWindow::SetFocusWhenShown(bool focused) { | 531 void RootWindow::SetFocusWhenShown(bool focused) { |
| 532 host_->SetFocusWhenShown(focused); | 532 host_->SetFocusWhenShown(focused); |
| 533 } | 533 } |
| 534 | 534 |
| 535 bool RootWindow::GrabSnapshot(std::vector<unsigned char>* png_representation, |
| 536 const gfx::Rect& snapshot_bounds) { |
| 537 DCHECK(bounds().Contains(snapshot_bounds)); |
| 538 return host_->GrabSnapshot(png_representation, snapshot_bounds); |
| 539 } |
| 540 |
| 535 //////////////////////////////////////////////////////////////////////////////// | 541 //////////////////////////////////////////////////////////////////////////////// |
| 536 // RootWindow, Window overrides: | 542 // RootWindow, Window overrides: |
| 537 | 543 |
| 538 RootWindow* RootWindow::GetRootWindow() { | 544 RootWindow* RootWindow::GetRootWindow() { |
| 539 return this; | 545 return this; |
| 540 } | 546 } |
| 541 | 547 |
| 542 const RootWindow* RootWindow::GetRootWindow() const { | 548 const RootWindow* RootWindow::GetRootWindow() const { |
| 543 return this; | 549 return this; |
| 544 } | 550 } |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 void RootWindow::UnlockCompositor() { | 1029 void RootWindow::UnlockCompositor() { |
| 1024 DCHECK(compositor_lock_); | 1030 DCHECK(compositor_lock_); |
| 1025 compositor_lock_ = NULL; | 1031 compositor_lock_ = NULL; |
| 1026 if (draw_on_compositor_unlock_) { | 1032 if (draw_on_compositor_unlock_) { |
| 1027 draw_on_compositor_unlock_ = false; | 1033 draw_on_compositor_unlock_ = false; |
| 1028 ScheduleDraw(); | 1034 ScheduleDraw(); |
| 1029 } | 1035 } |
| 1030 } | 1036 } |
| 1031 | 1037 |
| 1032 } // namespace aura | 1038 } // namespace aura |
| OLD | NEW |