| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/widget_win.h" | 5 #include "views/widget/widget_win.h" |
| 6 | 6 |
| 7 #include "app/l10n_util_win.h" | 7 #include "app/l10n_util_win.h" |
| 8 #include "app/system_monitor.h" | 8 #include "app/system_monitor.h" |
| 9 #include "app/view_prop.h" | 9 #include "app/view_prop.h" |
| 10 #include "app/win/hwnd_util.h" | 10 #include "app/win/hwnd_util.h" |
| 11 #include "app/win/win_util.h" | 11 #include "app/win/win_util.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 | 233 |
| 234 GetClientRect(&crect); | 234 GetClientRect(&crect); |
| 235 POINT p = {0, 0}; | 235 POINT p = {0, 0}; |
| 236 ClientToScreen(hwnd(), &p); | 236 ClientToScreen(hwnd(), &p); |
| 237 out->SetRect(crect.left + p.x, crect.top + p.y, | 237 out->SetRect(crect.left + p.x, crect.top + p.y, |
| 238 crect.Width(), crect.Height()); | 238 crect.Width(), crect.Height()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void WidgetWin::SetBounds(const gfx::Rect& bounds) { | 241 void WidgetWin::SetBounds(const gfx::Rect& bounds) { |
| 242 if (IsZoomed()) |
| 243 ShowWindow(SW_SHOWNOACTIVATE); |
| 242 SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(), | 244 SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(), |
| 243 SWP_NOACTIVATE | SWP_NOZORDER); | 245 SWP_NOACTIVATE | SWP_NOZORDER); |
| 244 } | 246 } |
| 245 | 247 |
| 246 void WidgetWin::MoveAbove(Widget* other) { | 248 void WidgetWin::MoveAbove(Widget* other) { |
| 247 gfx::Rect bounds; | 249 gfx::Rect bounds; |
| 248 GetBounds(&bounds, false); | 250 GetBounds(&bounds, false); |
| 249 SetWindowPos(other->GetNativeView(), bounds.x(), bounds.y(), | 251 SetWindowPos(other->GetNativeView(), bounds.x(), bounds.y(), |
| 250 bounds.width(), bounds.height(), SWP_NOACTIVATE); | 252 bounds.width(), bounds.height(), SWP_NOACTIVATE); |
| 251 } | 253 } |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { | 1359 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { |
| 1358 return Widget::GetWidgetFromNativeView(native_window); | 1360 return Widget::GetWidgetFromNativeView(native_window); |
| 1359 } | 1361 } |
| 1360 | 1362 |
| 1361 // static | 1363 // static |
| 1362 void Widget::NotifyLocaleChanged() { | 1364 void Widget::NotifyLocaleChanged() { |
| 1363 NOTIMPLEMENTED(); | 1365 NOTIMPLEMENTED(); |
| 1364 } | 1366 } |
| 1365 | 1367 |
| 1366 } // namespace views | 1368 } // namespace views |
| OLD | NEW |