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.h" | 5 #include "ui/views/widget/widget.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "ui/base/events/event.h" | 10 #include "ui/base/events/event.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 has_dropshadow(false), | 152 has_dropshadow(false), |
153 remove_standard_frame(false), | 153 remove_standard_frame(false), |
154 use_system_default_icon(false), | 154 use_system_default_icon(false), |
155 show_state(ui::SHOW_STATE_DEFAULT), | 155 show_state(ui::SHOW_STATE_DEFAULT), |
156 double_buffer(false), | 156 double_buffer(false), |
157 parent(NULL), | 157 parent(NULL), |
158 parent_widget(NULL), | 158 parent_widget(NULL), |
159 native_widget(NULL), | 159 native_widget(NULL), |
160 desktop_root_window_host(NULL), | 160 desktop_root_window_host(NULL), |
161 top_level(false), | 161 top_level(false), |
162 layer_type(ui::LAYER_TEXTURED) { | 162 layer_type(ui::LAYER_TEXTURED), |
| 163 context(NULL) { |
163 } | 164 } |
164 | 165 |
165 Widget::InitParams::InitParams(Type type) | 166 Widget::InitParams::InitParams(Type type) |
166 : type(type), | 167 : type(type), |
167 delegate(NULL), | 168 delegate(NULL), |
168 child(type == TYPE_CONTROL), | 169 child(type == TYPE_CONTROL), |
169 transient(type == TYPE_BUBBLE || type == TYPE_POPUP || type == TYPE_MENU), | 170 transient(type == TYPE_BUBBLE || type == TYPE_POPUP || type == TYPE_MENU), |
170 transparent(type == TYPE_WINDOW && | 171 transparent(type == TYPE_WINDOW && |
171 ViewsDelegate::views_delegate && | 172 ViewsDelegate::views_delegate && |
172 ViewsDelegate::views_delegate->UseTransparentWindows()), | 173 ViewsDelegate::views_delegate->UseTransparentWindows()), |
173 accept_events(true), | 174 accept_events(true), |
174 can_activate(type != TYPE_POPUP && type != TYPE_MENU), | 175 can_activate(type != TYPE_POPUP && type != TYPE_MENU), |
175 keep_on_top(type == TYPE_MENU), | 176 keep_on_top(type == TYPE_MENU), |
176 ownership(NATIVE_WIDGET_OWNS_WIDGET), | 177 ownership(NATIVE_WIDGET_OWNS_WIDGET), |
177 mirror_origin_in_rtl(false), | 178 mirror_origin_in_rtl(false), |
178 has_dropshadow(false), | 179 has_dropshadow(false), |
179 remove_standard_frame(false), | 180 remove_standard_frame(false), |
180 show_state(ui::SHOW_STATE_DEFAULT), | 181 show_state(ui::SHOW_STATE_DEFAULT), |
181 double_buffer(false), | 182 double_buffer(false), |
182 parent(NULL), | 183 parent(NULL), |
183 parent_widget(NULL), | 184 parent_widget(NULL), |
184 native_widget(NULL), | 185 native_widget(NULL), |
185 desktop_root_window_host(NULL), | 186 desktop_root_window_host(NULL), |
186 top_level(false), | 187 top_level(false), |
187 layer_type(ui::LAYER_TEXTURED) { | 188 layer_type(ui::LAYER_TEXTURED), |
| 189 context(NULL) { |
188 } | 190 } |
189 | 191 |
190 gfx::NativeView Widget::InitParams::GetParent() const { | 192 gfx::NativeView Widget::InitParams::GetParent() const { |
191 return parent_widget ? parent_widget->GetNativeView() : parent; | 193 return parent_widget ? parent_widget->GetNativeView() : parent; |
192 } | 194 } |
193 | 195 |
194 //////////////////////////////////////////////////////////////////////////////// | 196 //////////////////////////////////////////////////////////////////////////////// |
195 // Widget, public: | 197 // Widget, public: |
196 | 198 |
197 Widget::Widget() | 199 Widget::Widget() |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 | 1367 |
1366 //////////////////////////////////////////////////////////////////////////////// | 1368 //////////////////////////////////////////////////////////////////////////////// |
1367 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1369 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1368 | 1370 |
1369 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1371 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1370 return this; | 1372 return this; |
1371 } | 1373 } |
1372 | 1374 |
1373 } // namespace internal | 1375 } // namespace internal |
1374 } // namespace views | 1376 } // namespace views |
OLD | NEW |