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

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 GestureSignature enum type 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
« no previous file with comments | « views/touchui/gesture_recognizer.cc ('k') | views/view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 // This method is invoked when the mouse exits this control 582 // This method is invoked when the mouse exits this control
583 // The provided event location is always (0, 0) 583 // The provided event location is always (0, 0)
584 // Default implementation does nothing. Override as needed. 584 // Default implementation does nothing. Override as needed.
585 virtual void OnMouseExited(const MouseEvent& event); 585 virtual void OnMouseExited(const MouseEvent& event);
586 586
587 // This method is invoked for each touch event. Default implementation 587 // This method is invoked for each touch event. Default implementation
588 // does nothing. Override as needed. 588 // does nothing. Override as needed.
589 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event); 589 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event);
590 590
591 // This method is invoked for each GestureEvent recognized from GestureManager
592 // Default implementation does nothing. Override as needed.
593 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event);
594
591 // Set the MouseHandler for a drag session. 595 // Set the MouseHandler for a drag session.
592 // 596 //
593 // A drag session is a stream of mouse events starting 597 // A drag session is a stream of mouse events starting
594 // with a MousePressed event, followed by several MouseDragged 598 // with a MousePressed event, followed by several MouseDragged
595 // events and finishing with a MouseReleased event. 599 // events and finishing with a MouseReleased event.
596 // 600 //
597 // This method should be only invoked while processing a 601 // This method should be only invoked while processing a
598 // MouseDragged or MousePressed event. 602 // MouseDragged or MousePressed event.
599 // 603 //
600 // All further mouse dragged and mouse up events will be sent 604 // All further mouse dragged and mouse up events will be sent
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX 1269 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX
1266 // method. If a drag is detected, DoDrag is invoked. 1270 // method. If a drag is detected, DoDrag is invoked.
1267 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info); 1271 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info);
1268 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info); 1272 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info);
1269 void ProcessMouseReleased(const MouseEvent& event); 1273 void ProcessMouseReleased(const MouseEvent& event);
1270 1274
1271 // RootView will invoke this with incoming TouchEvents. Returns the 1275 // RootView will invoke this with incoming TouchEvents. Returns the
1272 // the result of OnTouchEvent. 1276 // the result of OnTouchEvent.
1273 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event); 1277 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event);
1274 1278
1279 // GestureManager will invoke this with incoming GestureEvents. Returns the
1280 // the result of OnGestureEvent.
1281 ui::GestureStatus ProcessGestureEvent(const GestureEvent& event);
1282
1275 // Accelerators -------------------------------------------------------------- 1283 // Accelerators --------------------------------------------------------------
1276 1284
1277 // Registers this view's keyboard accelerators that are not registered to 1285 // Registers this view's keyboard accelerators that are not registered to
1278 // FocusManager yet, if possible. 1286 // FocusManager yet, if possible.
1279 void RegisterPendingAccelerators(); 1287 void RegisterPendingAccelerators();
1280 1288
1281 // Unregisters all the keyboard accelerators associated with this view. 1289 // Unregisters all the keyboard accelerators associated with this view.
1282 // |leave_data_intact| if true does not remove data from accelerators_ array, 1290 // |leave_data_intact| if true does not remove data from accelerators_ array,
1283 // so it could be re-registered with other focus manager 1291 // so it could be re-registered with other focus manager
1284 void UnregisterAccelerators(bool leave_data_intact); 1292 void UnregisterAccelerators(bool leave_data_intact);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 base::win::ScopedComPtr<NativeViewAccessibilityWin> 1452 base::win::ScopedComPtr<NativeViewAccessibilityWin>
1445 native_view_accessibility_win_; 1453 native_view_accessibility_win_;
1446 #endif 1454 #endif
1447 1455
1448 DISALLOW_COPY_AND_ASSIGN(View); 1456 DISALLOW_COPY_AND_ASSIGN(View);
1449 }; 1457 };
1450 1458
1451 } // namespace views 1459 } // namespace views
1452 1460
1453 #endif // VIEWS_VIEW_H_ 1461 #endif // VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « views/touchui/gesture_recognizer.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698