| 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 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/system_monitor/system_monitor.h" | 10 #include "base/system_monitor/system_monitor.h" |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1776 if (params.has_dropshadow) { | 1776 if (params.has_dropshadow) { |
| 1777 class_style |= (base::win::GetVersion() < base::win::VERSION_XP) ? | 1777 class_style |= (base::win::GetVersion() < base::win::VERSION_XP) ? |
| 1778 0 : CS_DROPSHADOW; | 1778 0 : CS_DROPSHADOW; |
| 1779 } | 1779 } |
| 1780 | 1780 |
| 1781 // Set type-dependent style attributes. | 1781 // Set type-dependent style attributes. |
| 1782 switch (params.type) { | 1782 switch (params.type) { |
| 1783 case Widget::InitParams::TYPE_WINDOW: | 1783 case Widget::InitParams::TYPE_WINDOW: |
| 1784 case Widget::InitParams::TYPE_CONTROL: | 1784 case Widget::InitParams::TYPE_CONTROL: |
| 1785 break; | 1785 break; |
| 1786 case Widget::InitParams::TYPE_WINDOW_FRAMELESS: |
| 1787 style |= WS_POPUP; |
| 1788 break; |
| 1786 case Widget::InitParams::TYPE_POPUP: | 1789 case Widget::InitParams::TYPE_POPUP: |
| 1787 style |= WS_POPUP; | 1790 style |= WS_POPUP; |
| 1788 ex_style |= WS_EX_TOOLWINDOW; | 1791 ex_style |= WS_EX_TOOLWINDOW; |
| 1789 break; | 1792 break; |
| 1790 case Widget::InitParams::TYPE_MENU: | 1793 case Widget::InitParams::TYPE_MENU: |
| 1791 style |= WS_POPUP; | 1794 style |= WS_POPUP; |
| 1792 break; | 1795 break; |
| 1793 default: | 1796 default: |
| 1794 NOTREACHED(); | 1797 NOTREACHED(); |
| 1795 } | 1798 } |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2064 | 2067 |
| 2065 // And now, notify them that they have a brand new parent. | 2068 // And now, notify them that they have a brand new parent. |
| 2066 for (NativeWidgets::iterator it = widgets.begin(); | 2069 for (NativeWidgets::iterator it = widgets.begin(); |
| 2067 it != widgets.end(); ++it) { | 2070 it != widgets.end(); ++it) { |
| 2068 (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(true, | 2071 (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(true, |
| 2069 new_parent); | 2072 new_parent); |
| 2070 } | 2073 } |
| 2071 } | 2074 } |
| 2072 | 2075 |
| 2073 } // namespace views | 2076 } // namespace views |
| OLD | NEW |