| 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 "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/hit_test.h" | 10 #include "ui/base/hit_test.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 debug_paint = enabled; | 290 debug_paint = enabled; |
| 291 } | 291 } |
| 292 | 292 |
| 293 // static | 293 // static |
| 294 bool Widget::IsDebugPaintEnabled() { | 294 bool Widget::IsDebugPaintEnabled() { |
| 295 return debug_paint; | 295 return debug_paint; |
| 296 } | 296 } |
| 297 | 297 |
| 298 // static | 298 // static |
| 299 bool Widget::RequiresNonClientView(InitParams::Type type) { | 299 bool Widget::RequiresNonClientView(InitParams::Type type) { |
| 300 return type == InitParams::TYPE_WINDOW || type == InitParams::TYPE_BUBBLE; | 300 return type == InitParams::TYPE_WINDOW || |
| 301 type == InitParams::TYPE_PANEL || |
| 302 type == InitParams::TYPE_BUBBLE; |
| 301 } | 303 } |
| 302 | 304 |
| 303 void Widget::Init(const InitParams& params) { | 305 void Widget::Init(const InitParams& params) { |
| 304 is_top_level_ = params.top_level || | 306 is_top_level_ = params.top_level || |
| 305 (!params.child && | 307 (!params.child && |
| 306 params.type != InitParams::TYPE_CONTROL && | 308 params.type != InitParams::TYPE_CONTROL && |
| 307 params.type != InitParams::TYPE_TOOLTIP); | 309 params.type != InitParams::TYPE_TOOLTIP); |
| 308 widget_delegate_ = params.delegate ? | 310 widget_delegate_ = params.delegate ? |
| 309 params.delegate : new DefaultWidgetDelegate(this, params); | 311 params.delegate : new DefaultWidgetDelegate(this, params); |
| 310 ownership_ = params.ownership; | 312 ownership_ = params.ownership; |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 | 1204 |
| 1203 //////////////////////////////////////////////////////////////////////////////// | 1205 //////////////////////////////////////////////////////////////////////////////// |
| 1204 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1206 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1205 | 1207 |
| 1206 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1208 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1207 return this; | 1209 return this; |
| 1208 } | 1210 } |
| 1209 | 1211 |
| 1210 } // namespace internal | 1212 } // namespace internal |
| 1211 } // namespace views | 1213 } // namespace views |
| OLD | NEW |