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

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: 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_host_win.h ('k') | no next file » | 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_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::GrabSnapshot(
271 const gfx::Rect& snapshot_bounds,
272 std::vector<unsigned char>* png_representation) {
273 NOTIMPLEMENTED();
274 return false;
275 }
276
270 void RootWindowHostWin::UnConfineCursor() { 277 void RootWindowHostWin::UnConfineCursor() {
271 ClipCursor(NULL); 278 ClipCursor(NULL);
272 } 279 }
273 280
274 void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) { 281 void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
275 POINT pt; 282 POINT pt;
276 ClientToScreen(hwnd(), &pt); 283 ClientToScreen(hwnd(), &pt);
277 SetCursorPos(pt.x, pt.y); 284 SetCursorPos(pt.x, pt.y);
278 } 285 }
279 286
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 336 }
330 337
331 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { 338 void RootWindowHostWin::OnSize(UINT param, const CSize& size) {
332 // Minimizing resizes the window to 0x0 which causes our layout to go all 339 // Minimizing resizes the window to 0x0 which causes our layout to go all
333 // screwy, so we just ignore it. 340 // screwy, so we just ignore it.
334 if (param != SIZE_MINIMIZED) 341 if (param != SIZE_MINIMIZED)
335 root_window_->OnHostResized(gfx::Size(size.cx, size.cy)); 342 root_window_->OnHostResized(gfx::Size(size.cx, size.cy));
336 } 343 }
337 344
338 } // namespace aura 345 } // namespace aura
OLDNEW
« no previous file with comments | « 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