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

Side by Side Diff: ui/aura/root_window.cc

Issue 10386124: Introduce XGetImage() for GrabWindowSnapshot() in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(const gfx::Rect& snapshot_bounds,
536 std::vector<unsigned char>* png_representation) {
537 DCHECK(bounds().Contains(snapshot_bounds));
538 return host_->GrabSnapshot(snapshot_bounds, png_representation);
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
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
OLDNEW
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698