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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 return widget; | 189 return widget; |
190 } | 190 } |
191 | 191 |
192 // static | 192 // static |
193 void Widget::SetPureViews(bool pure) { | 193 void Widget::SetPureViews(bool pure) { |
194 use_pure_views = pure; | 194 use_pure_views = pure; |
195 } | 195 } |
196 | 196 |
197 // static | 197 // static |
198 bool Widget::IsPureViews() { | 198 bool Widget::IsPureViews() { |
| 199 #if defined(TOUCH_UI) |
| 200 return true; |
| 201 #else |
199 return use_pure_views; | 202 return use_pure_views; |
| 203 #endif |
200 } | 204 } |
201 | 205 |
202 // static | 206 // static |
203 Widget* Widget::GetWidgetForNativeView(gfx::NativeView native_view) { | 207 Widget* Widget::GetWidgetForNativeView(gfx::NativeView native_view) { |
204 internal::NativeWidgetPrivate* native_widget = | 208 internal::NativeWidgetPrivate* native_widget = |
205 internal::NativeWidgetPrivate::GetNativeWidgetForNativeView(native_view); | 209 internal::NativeWidgetPrivate::GetNativeWidgetForNativeView(native_view); |
206 return native_widget ? native_widget->GetWidget() : NULL; | 210 return native_widget ? native_widget->GetWidget() : NULL; |
207 } | 211 } |
208 | 212 |
209 // static | 213 // static |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 | 1009 |
1006 //////////////////////////////////////////////////////////////////////////////// | 1010 //////////////////////////////////////////////////////////////////////////////// |
1007 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1011 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1008 | 1012 |
1009 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1013 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1010 return this; | 1014 return this; |
1011 } | 1015 } |
1012 | 1016 |
1013 } // namespace internal | 1017 } // namespace internal |
1014 } // namespace views | 1018 } // namespace views |
OLD | NEW |