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

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: Reverted chrome_switches.cc changes and TOT sync up 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 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
595
591 // Set the MouseHandler for a drag session. 596 // Set the MouseHandler for a drag session.
592 // 597 //
593 // A drag session is a stream of mouse events starting 598 // A drag session is a stream of mouse events starting
594 // with a MousePressed event, followed by several MouseDragged 599 // with a MousePressed event, followed by several MouseDragged
595 // events and finishing with a MouseReleased event. 600 // events and finishing with a MouseReleased event.
596 // 601 //
597 // This method should be only invoked while processing a 602 // This method should be only invoked while processing a
598 // MouseDragged or MousePressed event. 603 // MouseDragged or MousePressed event.
599 // 604 //
600 // All further mouse dragged and mouse up events will be sent 605 // 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 1270 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX
1266 // method. If a drag is detected, DoDrag is invoked. 1271 // method. If a drag is detected, DoDrag is invoked.
1267 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info); 1272 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info);
1268 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info); 1273 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info);
1269 void ProcessMouseReleased(const MouseEvent& event); 1274 void ProcessMouseReleased(const MouseEvent& event);
1270 1275
1271 // RootView will invoke this with incoming TouchEvents. Returns the 1276 // RootView will invoke this with incoming TouchEvents. Returns the
1272 // the result of OnTouchEvent. 1277 // the result of OnTouchEvent.
1273 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event); 1278 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event);
1274 1279
1280 // GestureManager will invoke this with incoming GestureEvents. Returns the
1281 // the result of OnGestureEvent.
1282 ui::GestureStatus ProcessGestureEvent(const GestureEvent& event);
1283
1275 // Accelerators -------------------------------------------------------------- 1284 // Accelerators --------------------------------------------------------------
1276 1285
1277 // Registers this view's keyboard accelerators that are not registered to 1286 // Registers this view's keyboard accelerators that are not registered to
1278 // FocusManager yet, if possible. 1287 // FocusManager yet, if possible.
1279 void RegisterPendingAccelerators(); 1288 void RegisterPendingAccelerators();
1280 1289
1281 // Unregisters all the keyboard accelerators associated with this view. 1290 // Unregisters all the keyboard accelerators associated with this view.
1282 // |leave_data_intact| if true does not remove data from accelerators_ array, 1291 // |leave_data_intact| if true does not remove data from accelerators_ array,
1283 // so it could be re-registered with other focus manager 1292 // so it could be re-registered with other focus manager
1284 void UnregisterAccelerators(bool leave_data_intact); 1293 void UnregisterAccelerators(bool leave_data_intact);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 base::win::ScopedComPtr<NativeViewAccessibilityWin> 1453 base::win::ScopedComPtr<NativeViewAccessibilityWin>
1445 native_view_accessibility_win_; 1454 native_view_accessibility_win_;
1446 #endif 1455 #endif
1447 1456
1448 DISALLOW_COPY_AND_ASSIGN(View); 1457 DISALLOW_COPY_AND_ASSIGN(View);
1449 }; 1458 };
1450 1459
1451 } // namespace views 1460 } // namespace views
1452 1461
1453 #endif // VIEWS_VIEW_H_ 1462 #endif // VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698