| 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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 if (is_mouse_button_pressed_) | 1029 if (is_mouse_button_pressed_) |
| 1030 GetRootView()->OnMouseCaptureLost(); | 1030 GetRootView()->OnMouseCaptureLost(); |
| 1031 is_mouse_button_pressed_ = false; | 1031 is_mouse_button_pressed_ = false; |
| 1032 } | 1032 } |
| 1033 | 1033 |
| 1034 ui::TouchStatus Widget::OnTouchEvent(const TouchEvent& event) { | 1034 ui::TouchStatus Widget::OnTouchEvent(const TouchEvent& event) { |
| 1035 ScopedEvent scoped(this, event); | 1035 ScopedEvent scoped(this, event); |
| 1036 return static_cast<internal::RootView*>(GetRootView())->OnTouchEvent(event); | 1036 return static_cast<internal::RootView*>(GetRootView())->OnTouchEvent(event); |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 bool Widget::OnGestureEvent(const GestureEvent& event) { |
| 1040 ScopedEvent scoped(this, event); |
| 1041 return static_cast<internal::RootView*>(GetRootView())->OnGestureEvent(event); |
| 1042 } |
| 1043 |
| 1039 bool Widget::ExecuteCommand(int command_id) { | 1044 bool Widget::ExecuteCommand(int command_id) { |
| 1040 return widget_delegate_->ExecuteWindowsCommand(command_id); | 1045 return widget_delegate_->ExecuteWindowsCommand(command_id); |
| 1041 } | 1046 } |
| 1042 | 1047 |
| 1043 InputMethod* Widget::GetInputMethodDirect() { | 1048 InputMethod* Widget::GetInputMethodDirect() { |
| 1044 return input_method_.get(); | 1049 return input_method_.get(); |
| 1045 } | 1050 } |
| 1046 | 1051 |
| 1047 Widget* Widget::AsWidget() { | 1052 Widget* Widget::AsWidget() { |
| 1048 return this; | 1053 return this; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 | 1191 |
| 1187 //////////////////////////////////////////////////////////////////////////////// | 1192 //////////////////////////////////////////////////////////////////////////////// |
| 1188 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1193 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1189 | 1194 |
| 1190 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1195 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1191 return this; | 1196 return this; |
| 1192 } | 1197 } |
| 1193 | 1198 |
| 1194 } // namespace internal | 1199 } // namespace internal |
| 1195 } // namespace views | 1200 } // namespace views |
| OLD | NEW |