| 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/native_widget_view.h" | 5 #include "views/widget/native_widget_view.h" |
| 6 | 6 |
| 7 #include "ui/gfx/canvas.h" | 7 #include "ui/gfx/canvas.h" |
| 8 | 8 |
| 9 namespace views { | 9 namespace views { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 MouseEvent e(event, this); | 97 MouseEvent e(event, this); |
| 98 delegate()->OnMouseEvent(event); | 98 delegate()->OnMouseEvent(event); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void NativeWidgetView::OnMouseExited(const MouseEvent& event) { | 101 void NativeWidgetView::OnMouseExited(const MouseEvent& event) { |
| 102 MouseEvent e(event, this); | 102 MouseEvent e(event, this); |
| 103 delegate()->OnMouseEvent(event); | 103 delegate()->OnMouseEvent(event); |
| 104 } | 104 } |
| 105 | 105 |
| 106 ui::TouchStatus NativeWidgetView::OnTouchEvent(const TouchEvent& event) { | 106 ui::TouchStatus NativeWidgetView::OnTouchEvent(const TouchEvent& event) { |
| 107 return delegate()->OnTouchEvent(event); | 107 TouchEvent e(event, this); |
| 108 return delegate()->OnTouchEvent(e); |
| 108 } | 109 } |
| 109 | 110 |
| 110 bool NativeWidgetView::OnKeyPressed(const KeyEvent& event) { | 111 bool NativeWidgetView::OnKeyPressed(const KeyEvent& event) { |
| 111 return delegate()->OnKeyEvent(event); | 112 return delegate()->OnKeyEvent(event); |
| 112 } | 113 } |
| 113 | 114 |
| 114 bool NativeWidgetView::OnKeyReleased(const KeyEvent& event) { | 115 bool NativeWidgetView::OnKeyReleased(const KeyEvent& event) { |
| 115 return delegate()->OnKeyEvent(event); | 116 return delegate()->OnKeyEvent(event); |
| 116 } | 117 } |
| 117 | 118 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 root->PaintToLayer(root_dirty_rect); | 178 root->PaintToLayer(root_dirty_rect); |
| 178 } | 179 } |
| 179 | 180 |
| 180 void NativeWidgetView::PaintComposite() { | 181 void NativeWidgetView::PaintComposite() { |
| 181 View::PaintComposite(); | 182 View::PaintComposite(); |
| 182 GetAssociatedWidget()->GetRootView()->PaintComposite(); | 183 GetAssociatedWidget()->GetRootView()->PaintComposite(); |
| 183 } | 184 } |
| 184 | 185 |
| 185 } // namespace internal | 186 } // namespace internal |
| 186 } // namespace views | 187 } // namespace views |
| OLD | NEW |