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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 scoped_refptr<CompositorLock> RootWindow::GetCompositorLock() { | 541 scoped_refptr<CompositorLock> RootWindow::GetCompositorLock() { |
542 if (!compositor_lock_) | 542 if (!compositor_lock_) |
543 compositor_lock_ = new CompositorLock(this); | 543 compositor_lock_ = new CompositorLock(this); |
544 return compositor_lock_; | 544 return compositor_lock_; |
545 } | 545 } |
546 | 546 |
547 void RootWindow::SetFocusWhenShown(bool focused) { | 547 void RootWindow::SetFocusWhenShown(bool focused) { |
548 host_->SetFocusWhenShown(focused); | 548 host_->SetFocusWhenShown(focused); |
549 } | 549 } |
550 | 550 |
| 551 bool RootWindow::GrabWindowSnapshot( |
| 552 std::vector<unsigned char>* png_representation, |
| 553 const gfx::Rect& snapshot_bounds) { |
| 554 DCHECK(bounds().Contains(snapshot_bounds)); |
| 555 return host_->GrabWindowSnapshot(png_representation, snapshot_bounds); |
| 556 } |
| 557 |
551 //////////////////////////////////////////////////////////////////////////////// | 558 //////////////////////////////////////////////////////////////////////////////// |
552 // RootWindow, Window overrides: | 559 // RootWindow, Window overrides: |
553 | 560 |
554 RootWindow* RootWindow::GetRootWindow() { | 561 RootWindow* RootWindow::GetRootWindow() { |
555 return this; | 562 return this; |
556 } | 563 } |
557 | 564 |
558 const RootWindow* RootWindow::GetRootWindow() const { | 565 const RootWindow* RootWindow::GetRootWindow() const { |
559 return this; | 566 return this; |
560 } | 567 } |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 void RootWindow::UnlockCompositor() { | 1038 void RootWindow::UnlockCompositor() { |
1032 DCHECK(compositor_lock_); | 1039 DCHECK(compositor_lock_); |
1033 compositor_lock_ = NULL; | 1040 compositor_lock_ = NULL; |
1034 if (draw_on_compositor_unlock_) { | 1041 if (draw_on_compositor_unlock_) { |
1035 draw_on_compositor_unlock_ = false; | 1042 draw_on_compositor_unlock_ = false; |
1036 ScheduleDraw(); | 1043 ScheduleDraw(); |
1037 } | 1044 } |
1038 } | 1045 } |
1039 | 1046 |
1040 } // namespace aura | 1047 } // namespace aura |
OLD | NEW |