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

Side by Side Diff: ui/views/view.h

Issue 10479010: Gesture related changes for views: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test and add some mores Created 8 years, 6 months 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 | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | ui/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) 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 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // 593 //
594 // All further mouse dragged and mouse up events will be sent 594 // All further mouse dragged and mouse up events will be sent
595 // the MouseHandler, even if it is reparented to another window. 595 // the MouseHandler, even if it is reparented to another window.
596 // 596 //
597 // The MouseHandler is automatically cleared when the control 597 // The MouseHandler is automatically cleared when the control
598 // comes back from processing the MouseReleased event. 598 // comes back from processing the MouseReleased event.
599 // 599 //
600 // Note: if the mouse handler is no longer connected to a 600 // Note: if the mouse handler is no longer connected to a
601 // view hierarchy, events won't be sent. 601 // view hierarchy, events won't be sent.
602 // 602 //
603 // TODO(sky): rename this.
603 virtual void SetMouseHandler(View* new_mouse_handler); 604 virtual void SetMouseHandler(View* new_mouse_handler);
604 605
605 // Invoked when a key is pressed or released. 606 // Invoked when a key is pressed or released.
606 // Subclasser should return true if the event has been processed and false 607 // Subclasser should return true if the event has been processed and false
607 // otherwise. If the event has not been processed, the parent will be given a 608 // otherwise. If the event has not been processed, the parent will be given a
608 // chance. 609 // chance.
609 virtual bool OnKeyPressed(const KeyEvent& event); 610 virtual bool OnKeyPressed(const KeyEvent& event);
610 virtual bool OnKeyReleased(const KeyEvent& event); 611 virtual bool OnKeyReleased(const KeyEvent& event);
611 612
612 // Invoked when the user uses the mousewheel. Implementors should return true 613 // Invoked when the user uses the mousewheel. Implementors should return true
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX 1267 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX
1267 // method. If a drag is detected, DoDrag is invoked. 1268 // method. If a drag is detected, DoDrag is invoked.
1268 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info); 1269 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info);
1269 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info); 1270 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info);
1270 void ProcessMouseReleased(const MouseEvent& event); 1271 void ProcessMouseReleased(const MouseEvent& event);
1271 1272
1272 // RootView will invoke this with incoming TouchEvents. Returns the result 1273 // RootView will invoke this with incoming TouchEvents. Returns the result
1273 // of OnTouchEvent. 1274 // of OnTouchEvent.
1274 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event); 1275 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event);
1275 1276
1276 // RootView will invoke this with incoming GestureEvents. Returns the result
1277 // of OnGestureEvent.
1278 ui::GestureStatus ProcessGestureEvent(const GestureEvent& event);
1279
1280 // Accelerators -------------------------------------------------------------- 1277 // Accelerators --------------------------------------------------------------
1281 1278
1282 // Registers this view's keyboard accelerators that are not registered to 1279 // Registers this view's keyboard accelerators that are not registered to
1283 // FocusManager yet, if possible. 1280 // FocusManager yet, if possible.
1284 void RegisterPendingAccelerators(); 1281 void RegisterPendingAccelerators();
1285 1282
1286 // Unregisters all the keyboard accelerators associated with this view. 1283 // Unregisters all the keyboard accelerators associated with this view.
1287 // |leave_data_intact| if true does not remove data from accelerators_ array, 1284 // |leave_data_intact| if true does not remove data from accelerators_ array,
1288 // so it could be re-registered with other focus manager 1285 // so it could be re-registered with other focus manager
1289 void UnregisterAccelerators(bool leave_data_intact); 1286 void UnregisterAccelerators(bool leave_data_intact);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 base::win::ScopedComPtr<NativeViewAccessibilityWin> 1461 base::win::ScopedComPtr<NativeViewAccessibilityWin>
1465 native_view_accessibility_win_; 1462 native_view_accessibility_win_;
1466 #endif 1463 #endif
1467 1464
1468 DISALLOW_COPY_AND_ASSIGN(View); 1465 DISALLOW_COPY_AND_ASSIGN(View);
1469 }; 1466 };
1470 1467
1471 } // namespace views 1468 } // namespace views
1472 1469
1473 #endif // UI_VIEWS_VIEW_H_ 1470 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698