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

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

Issue 10386124: Introduce XGetImage() for GrabWindowSnapshot() in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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_host_win.h" 5 #include "ui/aura/root_window_host_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 return gfx::Point(max(0, min(size.width(), static_cast<int>(pt.x))), 260 return gfx::Point(max(0, min(size.width(), static_cast<int>(pt.x))),
261 max(0, min(size.height(), static_cast<int>(pt.y)))); 261 max(0, min(size.height(), static_cast<int>(pt.y))));
262 } 262 }
263 263
264 bool RootWindowHostWin::ConfineCursorToRootWindow() { 264 bool RootWindowHostWin::ConfineCursorToRootWindow() {
265 RECT window_rect; 265 RECT window_rect;
266 GetWindowRect(hwnd(), &window_rect); 266 GetWindowRect(hwnd(), &window_rect);
267 return ClipCursor(&window_rect) != 0; 267 return ClipCursor(&window_rect) != 0;
268 } 268 }
269 269
270 bool RootWindowHostWin::GrabWindowSnapshot(
271 std::vector<unsigned char>* png_representation,
272 const gfx::Rect& snapshot_bounds) {
273 NOTIMPLEMENTED();
Daniel Erat 2012/05/14 23:17:40 don't think that this will compile; you need to re
Jun Mukai 2012/05/15 22:39:24 Done.
274 }
275
270 void RootWindowHostWin::UnConfineCursor() { 276 void RootWindowHostWin::UnConfineCursor() {
271 ClipCursor(NULL); 277 ClipCursor(NULL);
272 } 278 }
273 279
274 void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) { 280 void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
275 POINT pt; 281 POINT pt;
276 ClientToScreen(hwnd(), &pt); 282 ClientToScreen(hwnd(), &pt);
277 SetCursorPos(pt.x, pt.y); 283 SetCursorPos(pt.x, pt.y);
278 } 284 }
279 285
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 335 }
330 336
331 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { 337 void RootWindowHostWin::OnSize(UINT param, const CSize& size) {
332 // Minimizing resizes the window to 0x0 which causes our layout to go all 338 // Minimizing resizes the window to 0x0 which causes our layout to go all
333 // screwy, so we just ignore it. 339 // screwy, so we just ignore it.
334 if (param != SIZE_MINIMIZED) 340 if (param != SIZE_MINIMIZED)
335 root_window_->OnHostResized(gfx::Size(size.cx, size.cy)); 341 root_window_->OnHostResized(gfx::Size(size.cx, size.cy));
336 } 342 }
337 343
338 } // namespace aura 344 } // namespace aura
OLDNEW
« ui/aura/root_window_host_mac.mm ('K') | « ui/aura/root_window_host_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698