| OLD | NEW |
| 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/views/widget/widget_hwnd_utils.h" | 5 #include "ui/views/widget/widget_hwnd_utils.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 case Widget::InitParams::TYPE_CONTROL: | 116 case Widget::InitParams::TYPE_CONTROL: |
| 117 *style |= WS_VISIBLE; | 117 *style |= WS_VISIBLE; |
| 118 break; | 118 break; |
| 119 case Widget::InitParams::TYPE_WINDOW_FRAMELESS: | 119 case Widget::InitParams::TYPE_WINDOW_FRAMELESS: |
| 120 *style |= WS_POPUP; | 120 *style |= WS_POPUP; |
| 121 break; | 121 break; |
| 122 case Widget::InitParams::TYPE_BUBBLE: | 122 case Widget::InitParams::TYPE_BUBBLE: |
| 123 *style |= WS_POPUP; | 123 *style |= WS_POPUP; |
| 124 *style |= WS_CLIPCHILDREN; | 124 *style |= WS_CLIPCHILDREN; |
| 125 if (!params.force_show_in_taskbar) |
| 126 *ex_style |= WS_EX_TOOLWINDOW; |
| 125 break; | 127 break; |
| 126 case Widget::InitParams::TYPE_POPUP: | 128 case Widget::InitParams::TYPE_POPUP: |
| 127 *style |= WS_POPUP; | 129 *style |= WS_POPUP; |
| 128 *ex_style |= WS_EX_TOOLWINDOW; | 130 if (!params.force_show_in_taskbar) |
| 131 *ex_style |= WS_EX_TOOLWINDOW; |
| 129 break; | 132 break; |
| 130 case Widget::InitParams::TYPE_MENU: | 133 case Widget::InitParams::TYPE_MENU: |
| 131 *style |= WS_POPUP; | 134 *style |= WS_POPUP; |
| 132 break; | 135 break; |
| 133 default: | 136 default: |
| 134 NOTREACHED(); | 137 NOTREACHED(); |
| 135 } | 138 } |
| 136 } | 139 } |
| 137 | 140 |
| 138 } // namespace | 141 } // namespace |
| (...skipping 14 matching lines...) Expand all Loading... |
| 153 DWORD class_style = 0; | 156 DWORD class_style = 0; |
| 154 CalculateWindowStylesFromInitParams(params, widget_delegate, | 157 CalculateWindowStylesFromInitParams(params, widget_delegate, |
| 155 native_widget_delegate, &style, &ex_style, | 158 native_widget_delegate, &style, &ex_style, |
| 156 &class_style); | 159 &class_style); |
| 157 handler->set_initial_class_style(class_style); | 160 handler->set_initial_class_style(class_style); |
| 158 handler->set_window_style(handler->window_style() | style); | 161 handler->set_window_style(handler->window_style() | style); |
| 159 handler->set_window_ex_style(handler->window_ex_style() | ex_style); | 162 handler->set_window_ex_style(handler->window_ex_style() | ex_style); |
| 160 } | 163 } |
| 161 | 164 |
| 162 } // namespace views | 165 } // namespace views |
| OLD | NEW |