| 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 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 if (is_mouse_button_pressed_) | 1034 if (is_mouse_button_pressed_) |
| 1035 GetRootView()->OnMouseCaptureLost(); | 1035 GetRootView()->OnMouseCaptureLost(); |
| 1036 is_mouse_button_pressed_ = false; | 1036 is_mouse_button_pressed_ = false; |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 ui::TouchStatus Widget::OnTouchEvent(const TouchEvent& event) { | 1039 ui::TouchStatus Widget::OnTouchEvent(const TouchEvent& event) { |
| 1040 ScopedEvent scoped(this, event); | 1040 ScopedEvent scoped(this, event); |
| 1041 return static_cast<internal::RootView*>(GetRootView())->OnTouchEvent(event); | 1041 return static_cast<internal::RootView*>(GetRootView())->OnTouchEvent(event); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 bool Widget::OnGestureEvent(const GestureEvent& event) { |
| 1045 ScopedEvent scoped(this, event); |
| 1046 return static_cast<internal::RootView*>(GetRootView())->OnGestureEvent(event); |
| 1047 } |
| 1048 |
| 1044 bool Widget::ExecuteCommand(int command_id) { | 1049 bool Widget::ExecuteCommand(int command_id) { |
| 1045 return widget_delegate_->ExecuteWindowsCommand(command_id); | 1050 return widget_delegate_->ExecuteWindowsCommand(command_id); |
| 1046 } | 1051 } |
| 1047 | 1052 |
| 1048 InputMethod* Widget::GetInputMethodDirect() { | 1053 InputMethod* Widget::GetInputMethodDirect() { |
| 1049 return input_method_.get(); | 1054 return input_method_.get(); |
| 1050 } | 1055 } |
| 1051 | 1056 |
| 1052 Widget* Widget::AsWidget() { | 1057 Widget* Widget::AsWidget() { |
| 1053 return this; | 1058 return this; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 | 1204 |
| 1200 //////////////////////////////////////////////////////////////////////////////// | 1205 //////////////////////////////////////////////////////////////////////////////// |
| 1201 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1206 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1202 | 1207 |
| 1203 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1208 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1204 return this; | 1209 return this; |
| 1205 } | 1210 } |
| 1206 | 1211 |
| 1207 } // namespace internal | 1212 } // namespace internal |
| 1208 } // namespace views | 1213 } // namespace views |
| OLD | NEW |