Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: views/view.h

Issue 8364039: Initial views touchui GestureRecognizer support (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added ForwardGestureEvents()in RootView and incorporated comments Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef VIEWS_VIEW_H_ 5 #ifndef VIEWS_VIEW_H_
6 #define VIEWS_VIEW_H_ 6 #define VIEWS_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 580
581 // This method is invoked when the mouse exits this control 581 // This method is invoked when the mouse exits this control
582 // The provided event location is always (0, 0) 582 // The provided event location is always (0, 0)
583 // Default implementation does nothing. Override as needed. 583 // Default implementation does nothing. Override as needed.
584 virtual void OnMouseExited(const MouseEvent& event); 584 virtual void OnMouseExited(const MouseEvent& event);
585 585
586 // This method is invoked for each touch event. Default implementation 586 // This method is invoked for each touch event. Default implementation
587 // does nothing. Override as needed. 587 // does nothing. Override as needed.
588 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event); 588 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event);
589 589
590 // This method is invoked for each GestureEvent recognized from GestureManager
591 // Default implementation does nothing. Override as needed.
592 virtual bool OnGestureEvent(const GestureEvent& event);
593
594
590 // Set the MouseHandler for a drag session. 595 // Set the MouseHandler for a drag session.
591 // 596 //
592 // A drag session is a stream of mouse events starting 597 // A drag session is a stream of mouse events starting
593 // with a MousePressed event, followed by several MouseDragged 598 // with a MousePressed event, followed by several MouseDragged
594 // events and finishing with a MouseReleased event. 599 // events and finishing with a MouseReleased event.
595 // 600 //
596 // This method should be only invoked while processing a 601 // This method should be only invoked while processing a
597 // MouseDragged or MousePressed event. 602 // MouseDragged or MousePressed event.
598 // 603 //
599 // All further mouse dragged and mouse up events will be sent 604 // All further mouse dragged and mouse up events will be sent
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX 1271 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX
1267 // method. If a drag is detected, DoDrag is invoked. 1272 // method. If a drag is detected, DoDrag is invoked.
1268 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info); 1273 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info);
1269 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info); 1274 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info);
1270 void ProcessMouseReleased(const MouseEvent& event); 1275 void ProcessMouseReleased(const MouseEvent& event);
1271 1276
1272 // RootView will invoke this with incoming TouchEvents. Returns the 1277 // RootView will invoke this with incoming TouchEvents. Returns the
1273 // the result of OnTouchEvent. 1278 // the result of OnTouchEvent.
1274 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event); 1279 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event);
1275 1280
1281 // GestureManager will invoke this with incoming GestureEvents. Returns the
1282 // the result of OnGestureEvent.
1283 bool ProcessGestureEvent(const GestureEvent& event);
1284
1276 // Accelerators -------------------------------------------------------------- 1285 // Accelerators --------------------------------------------------------------
1277 1286
1278 // Registers this view's keyboard accelerators that are not registered to 1287 // Registers this view's keyboard accelerators that are not registered to
1279 // FocusManager yet, if possible. 1288 // FocusManager yet, if possible.
1280 void RegisterPendingAccelerators(); 1289 void RegisterPendingAccelerators();
1281 1290
1282 // Unregisters all the keyboard accelerators associated with this view. 1291 // Unregisters all the keyboard accelerators associated with this view.
1283 // |leave_data_intact| if true does not remove data from accelerators_ array, 1292 // |leave_data_intact| if true does not remove data from accelerators_ array,
1284 // so it could be re-registered with other focus manager 1293 // so it could be re-registered with other focus manager
1285 void UnregisterAccelerators(bool leave_data_intact); 1294 void UnregisterAccelerators(bool leave_data_intact);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 #if defined(OS_WIN) 1454 #if defined(OS_WIN)
1446 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; 1455 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_;
1447 #endif 1456 #endif
1448 1457
1449 DISALLOW_COPY_AND_ASSIGN(View); 1458 DISALLOW_COPY_AND_ASSIGN(View);
1450 }; 1459 };
1451 1460
1452 } // namespace views 1461 } // namespace views
1453 1462
1454 #endif // VIEWS_VIEW_H_ 1463 #endif // VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698