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/widget.h" | 5 #include "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/l10n/l10n_font_util.h" | 10 #include "ui/base/l10n/l10n_font_util.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 return CreateWindowWithParentAndBounds(delegate, NULL, bounds); | 187 return CreateWindowWithParentAndBounds(delegate, NULL, bounds); |
188 } | 188 } |
189 | 189 |
190 // static | 190 // static |
191 Widget* Widget::CreateWindowWithParentAndBounds(WidgetDelegate* delegate, | 191 Widget* Widget::CreateWindowWithParentAndBounds(WidgetDelegate* delegate, |
192 gfx::NativeWindow parent, | 192 gfx::NativeWindow parent, |
193 const gfx::Rect& bounds) { | 193 const gfx::Rect& bounds) { |
194 Widget* widget = new Widget; | 194 Widget* widget = new Widget; |
195 Widget::InitParams params; | 195 Widget::InitParams params; |
196 params.delegate = delegate; | 196 params.delegate = delegate; |
197 #if defined(OS_WIN) | 197 #if defined(OS_WIN) || defined(USE_AURA) |
198 params.parent = parent; | 198 params.parent = parent; |
199 #endif | 199 #endif |
200 params.bounds = bounds; | 200 params.bounds = bounds; |
201 widget->Init(params); | 201 widget->Init(params); |
202 return widget; | 202 return widget; |
203 } | 203 } |
204 | 204 |
205 // static | 205 // static |
206 void Widget::SetPureViews(bool pure) { | 206 void Widget::SetPureViews(bool pure) { |
207 use_pure_views = pure; | 207 use_pure_views = pure; |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 | 1134 |
1135 //////////////////////////////////////////////////////////////////////////////// | 1135 //////////////////////////////////////////////////////////////////////////////// |
1136 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1136 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1137 | 1137 |
1138 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1138 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1139 return this; | 1139 return this; |
1140 } | 1140 } |
1141 | 1141 |
1142 } // namespace internal | 1142 } // namespace internal |
1143 } // namespace views | 1143 } // namespace views |
OLD | NEW |