| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_VIEW_H_ | 5 #ifndef UI_VIEWS_VIEW_H_ |
| 6 #define UI_VIEWS_VIEW_H_ | 6 #define UI_VIEWS_VIEW_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 | 648 |
| 649 // Overridden from ui::EventTarget: | 649 // Overridden from ui::EventTarget: |
| 650 virtual bool CanAcceptEvents() OVERRIDE; | 650 virtual bool CanAcceptEvents() OVERRIDE; |
| 651 virtual ui::EventTarget* GetParentTarget() OVERRIDE; | 651 virtual ui::EventTarget* GetParentTarget() OVERRIDE; |
| 652 | 652 |
| 653 // Overridden from ui::EventHandler: | 653 // Overridden from ui::EventHandler: |
| 654 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 654 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE; |
| 655 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 655 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
| 656 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 656 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
| 657 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 657 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
| 658 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 658 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 659 | 659 |
| 660 // Accelerators -------------------------------------------------------------- | 660 // Accelerators -------------------------------------------------------------- |
| 661 | 661 |
| 662 // Sets a keyboard accelerator for that view. When the user presses the | 662 // Sets a keyboard accelerator for that view. When the user presses the |
| 663 // accelerator key combination, the AcceleratorPressed method is invoked. | 663 // accelerator key combination, the AcceleratorPressed method is invoked. |
| 664 // Note that you can set multiple accelerators for a view by invoking this | 664 // Note that you can set multiple accelerators for a view by invoking this |
| 665 // method several times. Note also that AcceleratorPressed is invoked only | 665 // method several times. Note also that AcceleratorPressed is invoked only |
| 666 // when CanHandleAccelerators() is true. | 666 // when CanHandleAccelerators() is true. |
| 667 virtual void AddAccelerator(const ui::Accelerator& accelerator); | 667 virtual void AddAccelerator(const ui::Accelerator& accelerator); |
| 668 | 668 |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX | 1293 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX |
| 1294 // method. If a drag is detected, DoDrag is invoked. | 1294 // method. If a drag is detected, DoDrag is invoked. |
| 1295 bool ProcessMousePressed(const ui::MouseEvent& event, DragInfo* drop_info); | 1295 bool ProcessMousePressed(const ui::MouseEvent& event, DragInfo* drop_info); |
| 1296 bool ProcessMouseDragged(const ui::MouseEvent& event, DragInfo* drop_info); | 1296 bool ProcessMouseDragged(const ui::MouseEvent& event, DragInfo* drop_info); |
| 1297 void ProcessMouseReleased(const ui::MouseEvent& event); | 1297 void ProcessMouseReleased(const ui::MouseEvent& event); |
| 1298 | 1298 |
| 1299 // RootView will invoke this with incoming TouchEvents. Returns the result | 1299 // RootView will invoke this with incoming TouchEvents. Returns the result |
| 1300 // of OnTouchEvent. | 1300 // of OnTouchEvent. |
| 1301 ui::EventResult ProcessTouchEvent(ui::TouchEvent* event); | 1301 ui::EventResult ProcessTouchEvent(ui::TouchEvent* event); |
| 1302 | 1302 |
| 1303 // RootView will invoke this with incoming GestureEvents. This will invoke | 1303 // RootView will invoke this with incoming GestureEvents. This invokes |
| 1304 // OnGestureEvent and return the result. | 1304 // OnGestureEvent. |
| 1305 ui::EventResult ProcessGestureEvent(ui::GestureEvent* event); | 1305 void ProcessGestureEvent(ui::GestureEvent* event); |
| 1306 | 1306 |
| 1307 // Accelerators -------------------------------------------------------------- | 1307 // Accelerators -------------------------------------------------------------- |
| 1308 | 1308 |
| 1309 // Registers this view's keyboard accelerators that are not registered to | 1309 // Registers this view's keyboard accelerators that are not registered to |
| 1310 // FocusManager yet, if possible. | 1310 // FocusManager yet, if possible. |
| 1311 void RegisterPendingAccelerators(); | 1311 void RegisterPendingAccelerators(); |
| 1312 | 1312 |
| 1313 // Unregisters all the keyboard accelerators associated with this view. | 1313 // Unregisters all the keyboard accelerators associated with this view. |
| 1314 // |leave_data_intact| if true does not remove data from accelerators_ array, | 1314 // |leave_data_intact| if true does not remove data from accelerators_ array, |
| 1315 // so it could be re-registered with other focus manager | 1315 // so it could be re-registered with other focus manager |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 base::win::ScopedComPtr<NativeViewAccessibilityWin> | 1493 base::win::ScopedComPtr<NativeViewAccessibilityWin> |
| 1494 native_view_accessibility_win_; | 1494 native_view_accessibility_win_; |
| 1495 #endif | 1495 #endif |
| 1496 | 1496 |
| 1497 DISALLOW_COPY_AND_ASSIGN(View); | 1497 DISALLOW_COPY_AND_ASSIGN(View); |
| 1498 }; | 1498 }; |
| 1499 | 1499 |
| 1500 } // namespace views | 1500 } // namespace views |
| 1501 | 1501 |
| 1502 #endif // UI_VIEWS_VIEW_H_ | 1502 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |