Chromium Code Reviews| 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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1045 if (is_mouse_button_pressed_) | 1045 if (is_mouse_button_pressed_) |
| 1046 GetRootView()->OnMouseCaptureLost(); | 1046 GetRootView()->OnMouseCaptureLost(); |
| 1047 is_mouse_button_pressed_ = false; | 1047 is_mouse_button_pressed_ = false; |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 ui::TouchStatus Widget::OnTouchEvent(const TouchEvent& event) { | 1050 ui::TouchStatus Widget::OnTouchEvent(const TouchEvent& event) { |
| 1051 ScopedEvent scoped(this, event); | 1051 ScopedEvent scoped(this, event); |
| 1052 return static_cast<internal::RootView*>(GetRootView())->OnTouchEvent(event); | 1052 return static_cast<internal::RootView*>(GetRootView())->OnTouchEvent(event); |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 bool Widget::OnGestureEvent(const GestureEvent& event) { | |
| 1056 ScopedEvent scoped(this, event); | |
| 1057 return static_cast<internal::RootView*>(GetRootView())->OnGestureEvent(event); | |
|
sadrul
2011/11/18 19:01:50
I think this can just be:
return GetRootView()-
Gajen
2011/11/21 15:56:50
Done.
| |
| 1058 } | |
| 1059 | |
| 1055 bool Widget::ExecuteCommand(int command_id) { | 1060 bool Widget::ExecuteCommand(int command_id) { |
| 1056 return widget_delegate_->ExecuteWindowsCommand(command_id); | 1061 return widget_delegate_->ExecuteWindowsCommand(command_id); |
| 1057 } | 1062 } |
| 1058 | 1063 |
| 1059 InputMethod* Widget::GetInputMethodDirect() { | 1064 InputMethod* Widget::GetInputMethodDirect() { |
| 1060 return input_method_.get(); | 1065 return input_method_.get(); |
| 1061 } | 1066 } |
| 1062 | 1067 |
| 1063 Widget* Widget::AsWidget() { | 1068 Widget* Widget::AsWidget() { |
| 1064 return this; | 1069 return this; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1210 | 1215 |
| 1211 //////////////////////////////////////////////////////////////////////////////// | 1216 //////////////////////////////////////////////////////////////////////////////// |
| 1212 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1217 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1213 | 1218 |
| 1214 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1219 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1215 return this; | 1220 return this; |
| 1216 } | 1221 } |
| 1217 | 1222 |
| 1218 } // namespace internal | 1223 } // namespace internal |
| 1219 } // namespace views | 1224 } // namespace views |
| OLD | NEW |