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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 Widget::InitParams params; | 208 Widget::InitParams params; |
209 params.bounds = bounds; | 209 params.bounds = bounds; |
210 params.delegate = delegate; | 210 params.delegate = delegate; |
211 params.top_level = true; | 211 params.top_level = true; |
212 widget->Init(params); | 212 widget->Init(params); |
213 return widget; | 213 return widget; |
214 } | 214 } |
215 | 215 |
216 // static | 216 // static |
217 Widget* Widget::CreateWindowWithParent(WidgetDelegate* delegate, | 217 Widget* Widget::CreateWindowWithParent(WidgetDelegate* delegate, |
218 gfx::NativeWindow parent) { | 218 gfx::NativeView parent) { |
219 return CreateWindowWithParentAndBounds(delegate, parent, gfx::Rect()); | 219 return CreateWindowWithParentAndBounds(delegate, parent, gfx::Rect()); |
220 } | 220 } |
221 | 221 |
222 // static | 222 // static |
223 Widget* Widget::CreateWindowWithParentAndBounds(WidgetDelegate* delegate, | 223 Widget* Widget::CreateWindowWithParentAndBounds(WidgetDelegate* delegate, |
224 gfx::NativeWindow parent, | 224 gfx::NativeView parent, |
225 const gfx::Rect& bounds) { | 225 const gfx::Rect& bounds) { |
226 Widget* widget = new Widget; | 226 Widget* widget = new Widget; |
227 Widget::InitParams params; | 227 Widget::InitParams params; |
228 params.delegate = delegate; | 228 params.delegate = delegate; |
229 params.parent = parent; | 229 params.parent = parent; |
230 params.bounds = bounds; | 230 params.bounds = bounds; |
231 widget->Init(params); | 231 widget->Init(params); |
232 return widget; | 232 return widget; |
233 } | 233 } |
234 | 234 |
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 | 1444 |
1445 //////////////////////////////////////////////////////////////////////////////// | 1445 //////////////////////////////////////////////////////////////////////////////// |
1446 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1446 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1447 | 1447 |
1448 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1448 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1449 return this; | 1449 return this; |
1450 } | 1450 } |
1451 | 1451 |
1452 } // namespace internal | 1452 } // namespace internal |
1453 } // namespace views | 1453 } // namespace views |
OLD | NEW |