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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 258 |
259 // static | 259 // static |
260 Widget* Widget::GetTopLevelWidgetForNativeView(gfx::NativeView native_view) { | 260 Widget* Widget::GetTopLevelWidgetForNativeView(gfx::NativeView native_view) { |
261 internal::NativeWidgetPrivate* native_widget = | 261 internal::NativeWidgetPrivate* native_widget = |
262 internal::NativeWidgetPrivate::GetTopLevelNativeWidget(native_view); | 262 internal::NativeWidgetPrivate::GetTopLevelNativeWidget(native_view); |
263 return native_widget ? native_widget->GetWidget() : NULL; | 263 return native_widget ? native_widget->GetWidget() : NULL; |
264 } | 264 } |
265 | 265 |
266 | 266 |
267 // static | 267 // static |
268 void Widget::GetAllChildWidgets(gfx::NativeView native_view, | 268 void Widget::GetAllChildAndOwnedWidgets(gfx::NativeView native_view, |
269 Widgets* children) { | 269 Widgets* widgets) { |
270 internal::NativeWidgetPrivate::GetAllChildWidgets(native_view, children); | 270 internal::NativeWidgetPrivate::GetAllChildAndOwnedWidgets(native_view, |
| 271 widgets); |
271 } | 272 } |
272 | 273 |
273 // static | 274 // static |
274 void Widget::GetAllOwnedWidgets(gfx::NativeView native_view, | |
275 Widgets* owned) { | |
276 internal::NativeWidgetPrivate::GetAllOwnedWidgets(native_view, owned); | |
277 } | |
278 | |
279 // static | |
280 void Widget::ReparentNativeView(gfx::NativeView native_view, | 275 void Widget::ReparentNativeView(gfx::NativeView native_view, |
281 gfx::NativeView new_parent) { | 276 gfx::NativeView new_parent) { |
282 internal::NativeWidgetPrivate::ReparentNativeView(native_view, new_parent); | 277 internal::NativeWidgetPrivate::ReparentNativeView(native_view, new_parent); |
283 } | 278 } |
284 | 279 |
285 // static | 280 // static |
286 int Widget::GetLocalizedContentsWidth(int col_resource_id) { | 281 int Widget::GetLocalizedContentsWidth(int col_resource_id) { |
287 return ui::GetLocalizedContentsWidthForFont(col_resource_id, | 282 return ui::GetLocalizedContentsWidthForFont(col_resource_id, |
288 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); | 283 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); |
289 } | 284 } |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 | 1505 |
1511 //////////////////////////////////////////////////////////////////////////////// | 1506 //////////////////////////////////////////////////////////////////////////////// |
1512 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1507 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1513 | 1508 |
1514 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1509 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1515 return this; | 1510 return this; |
1516 } | 1511 } |
1517 | 1512 |
1518 } // namespace internal | 1513 } // namespace internal |
1519 } // namespace views | 1514 } // namespace views |
OLD | NEW |