| 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/hit_test.h" | 10 #include "ui/base/hit_test.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 return widget; | 217 return widget; |
| 218 } | 218 } |
| 219 | 219 |
| 220 // static | 220 // static |
| 221 void Widget::SetPureViews(bool pure) { | 221 void Widget::SetPureViews(bool pure) { |
| 222 use_pure_views = pure; | 222 use_pure_views = pure; |
| 223 } | 223 } |
| 224 | 224 |
| 225 // static | 225 // static |
| 226 bool Widget::IsPureViews() { | 226 bool Widget::IsPureViews() { |
| 227 #if defined(USE_ONLY_PURE_VIEWS) | 227 #if defined(USE_AURA) || defined(TOUCH_UI) |
| 228 return true; | 228 return true; |
| 229 #else | 229 #else |
| 230 return use_pure_views; | 230 return use_pure_views; |
| 231 #endif | 231 #endif |
| 232 } | 232 } |
| 233 | 233 |
| 234 // static | 234 // static |
| 235 Widget* Widget::GetWidgetForNativeView(gfx::NativeView native_view) { | 235 Widget* Widget::GetWidgetForNativeView(gfx::NativeView native_view) { |
| 236 internal::NativeWidgetPrivate* native_widget = | 236 internal::NativeWidgetPrivate* native_widget = |
| 237 internal::NativeWidgetPrivate::GetNativeWidgetForNativeView(native_view); | 237 internal::NativeWidgetPrivate::GetNativeWidgetForNativeView(native_view); |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 | 1210 |
| 1211 //////////////////////////////////////////////////////////////////////////////// | 1211 //////////////////////////////////////////////////////////////////////////////// |
| 1212 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1212 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1213 | 1213 |
| 1214 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1214 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1215 return this; | 1215 return this; |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 } // namespace internal | 1218 } // namespace internal |
| 1219 } // namespace views | 1219 } // namespace views |
| OLD | NEW |