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

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

Issue 10790019: Add gesture target fuzzing to views (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Patch with unit tests Created 8 years, 4 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
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 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 static void set_use_acceleration_when_possible(bool use); 495 static void set_use_acceleration_when_possible(bool use);
496 static bool get_use_acceleration_when_possible(); 496 static bool get_use_acceleration_when_possible();
497 497
498 // Input --------------------------------------------------------------------- 498 // Input ---------------------------------------------------------------------
499 // The points (and mouse locations) in the following functions are in the 499 // The points (and mouse locations) in the following functions are in the
500 // view's coordinates, except for a RootView. 500 // view's coordinates, except for a RootView.
501 501
502 // Returns the deepest visible descendant that contains the specified point. 502 // Returns the deepest visible descendant that contains the specified point.
503 virtual View* GetEventHandlerForPoint(const gfx::Point& point); 503 virtual View* GetEventHandlerForPoint(const gfx::Point& point);
504 504
505 // Considers the bounding rectangles of all leaf descendant views that have
506 // at least views::kFuzzingOverlapPercentage of their area covered by
507 // |touch_rect|. Among these rectangles, choose one that is closest to the
508 // center line of |touch_rect| and return its corresponding View. If there
509 // are no such rectangles, NULL is returned. Note that |touch_rect| is in
510 // screen coordinates.
511 virtual View* GetEventHandlerForRect(const gfx::Rect& touch_rect);
512
505 // Return the cursor that should be used for this view or the default cursor. 513 // Return the cursor that should be used for this view or the default cursor.
506 // The event location is in the receiver's coordinate system. The caller is 514 // The event location is in the receiver's coordinate system. The caller is
507 // responsible for managing the lifetime of the returned object, though that 515 // responsible for managing the lifetime of the returned object, though that
508 // lifetime may vary from platform to platform. On Windows and Aura, 516 // lifetime may vary from platform to platform. On Windows and Aura,
509 // the cursor is a shared resource. 517 // the cursor is a shared resource.
510 virtual gfx::NativeCursor GetCursor(const MouseEvent& event); 518 virtual gfx::NativeCursor GetCursor(const MouseEvent& event);
511 519
512 // Convenience to test whether a point is within this view's bounds 520 // Convenience to test whether a point is within this view's bounds
513 virtual bool HitTest(const gfx::Point& l) const; 521 virtual bool HitTest(const gfx::Point& l) const;
514 522
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 base::win::ScopedComPtr<NativeViewAccessibilityWin> 1485 base::win::ScopedComPtr<NativeViewAccessibilityWin>
1478 native_view_accessibility_win_; 1486 native_view_accessibility_win_;
1479 #endif 1487 #endif
1480 1488
1481 DISALLOW_COPY_AND_ASSIGN(View); 1489 DISALLOW_COPY_AND_ASSIGN(View);
1482 }; 1490 };
1483 1491
1484 } // namespace views 1492 } // namespace views
1485 1493
1486 #endif // UI_VIEWS_VIEW_H_ 1494 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« ui/views/events/event.h ('K') | « ui/views/events/event.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698