| OLD | NEW |
| 1 // Copyright (c) 2011 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/native_widget_win.h" | 5 #include "views/widget/native_widget_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 ::SetWindowPos(GetNativeView(), on_top ? HWND_TOPMOST : HWND_NOTOPMOST, | 919 ::SetWindowPos(GetNativeView(), on_top ? HWND_TOPMOST : HWND_NOTOPMOST, |
| 920 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); | 920 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); |
| 921 } | 921 } |
| 922 | 922 |
| 923 void NativeWidgetWin::Maximize() { | 923 void NativeWidgetWin::Maximize() { |
| 924 ExecuteSystemMenuCommand(SC_MAXIMIZE); | 924 ExecuteSystemMenuCommand(SC_MAXIMIZE); |
| 925 } | 925 } |
| 926 | 926 |
| 927 void NativeWidgetWin::Minimize() { | 927 void NativeWidgetWin::Minimize() { |
| 928 ExecuteSystemMenuCommand(SC_MINIMIZE); | 928 ExecuteSystemMenuCommand(SC_MINIMIZE); |
| 929 |
| 930 delegate_->OnNativeBlur(NULL); |
| 929 } | 931 } |
| 930 | 932 |
| 931 bool NativeWidgetWin::IsMaximized() const { | 933 bool NativeWidgetWin::IsMaximized() const { |
| 932 return !!::IsZoomed(GetNativeView()); | 934 return !!::IsZoomed(GetNativeView()); |
| 933 } | 935 } |
| 934 | 936 |
| 935 bool NativeWidgetWin::IsMinimized() const { | 937 bool NativeWidgetWin::IsMinimized() const { |
| 936 return !!::IsIconic(GetNativeView()); | 938 return !!::IsIconic(GetNativeView()); |
| 937 } | 939 } |
| 938 | 940 |
| (...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2530 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2532 return (GetKeyState(VK_LBUTTON) & 0x80) || |
| 2531 (GetKeyState(VK_RBUTTON) & 0x80) || | 2533 (GetKeyState(VK_RBUTTON) & 0x80) || |
| 2532 (GetKeyState(VK_MBUTTON) & 0x80) || | 2534 (GetKeyState(VK_MBUTTON) & 0x80) || |
| 2533 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2535 (GetKeyState(VK_XBUTTON1) & 0x80) || |
| 2534 (GetKeyState(VK_XBUTTON2) & 0x80); | 2536 (GetKeyState(VK_XBUTTON2) & 0x80); |
| 2535 } | 2537 } |
| 2536 | 2538 |
| 2537 } // namespace internal | 2539 } // namespace internal |
| 2538 | 2540 |
| 2539 } // namespace views | 2541 } // namespace views |
| OLD | NEW |