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

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

Issue 9837046: Revert r128507 "Revert r128436 "relanding: disabled workspace_window_resizer test. fixed access-aft… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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') | ui/aura/single_monitor_manager.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_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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void RootWindowHostWin::SetBounds(const gfx::Rect& bounds) { 180 void RootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
181 if (fullscreen_) { 181 if (fullscreen_) {
182 saved_window_rect_.right = saved_window_rect_.left + bounds.width(); 182 saved_window_rect_.right = saved_window_rect_.left + bounds.width();
183 saved_window_rect_.bottom = saved_window_rect_.top + bounds.height(); 183 saved_window_rect_.bottom = saved_window_rect_.top + bounds.height();
184 return; 184 return;
185 } 185 }
186 RECT window_rect; 186 RECT window_rect;
187 window_rect.left = bounds.x(); 187 window_rect.left = bounds.x();
188 window_rect.top = bounds.y(); 188 window_rect.top = bounds.y();
189 window_rect.right = bounds.width(); 189 window_rect.right = bounds.right() ;
190 window_rect.bottom = bounds.height(); 190 window_rect.bottom = bounds.bottom();
191 AdjustWindowRectEx(&window_rect, 191 AdjustWindowRectEx(&window_rect,
192 GetWindowLong(hwnd(), GWL_STYLE), 192 GetWindowLong(hwnd(), GWL_STYLE),
193 FALSE, 193 FALSE,
194 GetWindowLong(hwnd(), GWL_EXSTYLE)); 194 GetWindowLong(hwnd(), GWL_EXSTYLE));
195 SetWindowPos( 195 SetWindowPos(
196 hwnd(), 196 hwnd(),
197 NULL, 197 NULL,
198 0, 198 0,
199 0, 199 0,
200 window_rect.right - window_rect.left, 200 window_rect.right - window_rect.left,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 void RootWindowHostWin::UnConfineCursor() { 255 void RootWindowHostWin::UnConfineCursor() {
256 ClipCursor(NULL); 256 ClipCursor(NULL);
257 } 257 }
258 258
259 void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) { 259 void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
260 POINT pt; 260 POINT pt;
261 ClientToScreen(hwnd(), &pt); 261 ClientToScreen(hwnd(), &pt);
262 SetCursorPos(pt.x, pt.y); 262 SetCursorPos(pt.x, pt.y);
263 } 263 }
264 264
265 void RootWindowHostWin::SetFocusWhenShown(bool focus_when_shown) {
266 NOTIMPLEMENTED();
267 }
268
265 void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) { 269 void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) {
266 ::PostMessage( 270 ::PostMessage(
267 hwnd(), native_event.message, native_event.wParam, native_event.lParam); 271 hwnd(), native_event.message, native_event.wParam, native_event.lParam);
268 } 272 }
269 273
270 void RootWindowHostWin::OnClose() { 274 void RootWindowHostWin::OnClose() {
271 // TODO: this obviously shouldn't be here. 275 // TODO: this obviously shouldn't be here.
272 MessageLoopForUI::current()->Quit(); 276 MessageLoopForUI::current()->Quit();
273 } 277 }
274 278
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 314 }
311 315
312 void RootWindowHostWin::OnSize(UINT param, const CSize& size) { 316 void RootWindowHostWin::OnSize(UINT param, const CSize& size) {
313 // Minimizing resizes the window to 0x0 which causes our layout to go all 317 // Minimizing resizes the window to 0x0 which causes our layout to go all
314 // screwy, so we just ignore it. 318 // screwy, so we just ignore it.
315 if (param != SIZE_MINIMIZED) 319 if (param != SIZE_MINIMIZED)
316 root_window_->OnHostResized(gfx::Size(size.cx, size.cy)); 320 root_window_->OnHostResized(gfx::Size(size.cx, size.cy));
317 } 321 }
318 322
319 } // namespace aura 323 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_win.h ('k') | ui/aura/single_monitor_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698