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

Unified Diff: ui/aura/window.h

Issue 10854060: ash: Use different hit-test outer-region for mouse and touch events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scale 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/extensions/shell_window_views.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.h
diff --git a/ui/aura/window.h b/ui/aura/window.h
index 58a0f53bcd712c8ccc3505785f904ebc35d6aae3..93de18018d7171582b7f651b217bcce9d8cca31a 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -236,14 +236,17 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; }
// Sets the window to grab hits for an area extending -|insets| pixels outside
- // its bounds. This can be used to create an invisible non- client area, for
+ // its bounds. This can be used to create an invisible non-client area, for
// example if your windows have no visible frames but still need to have
- // resize edges.
- void set_hit_test_bounds_override_outer(const gfx::Insets& insets) {
- hit_test_bounds_override_outer_ = insets;
+ // resize edges. It is possible to set a larger hit-region for touch-events.
+ void SetHitTestBoundsOverrideOuter(const gfx::Insets& mouse_insets,
+ int touch_scale) {
+ hit_test_bounds_override_outer_mouse_ = mouse_insets;
+ hit_test_bounds_override_outer_touch_ = mouse_insets.Scale(touch_scale);
}
- gfx::Insets hit_test_bounds_override_outer() const {
- return hit_test_bounds_override_outer_;
+
+ gfx::Insets hit_test_bounds_override_outer_mouse() const {
+ return hit_test_bounds_override_outer_mouse_;
}
// Sets the window to grab hits for an area extending |insets| pixels inside
@@ -464,7 +467,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
bool ignore_events_;
// See set_hit_test_outer_override().
- gfx::Insets hit_test_bounds_override_outer_;
+ gfx::Insets hit_test_bounds_override_outer_mouse_;
+ gfx::Insets hit_test_bounds_override_outer_touch_;
gfx::Insets hit_test_bounds_override_inner_;
ObserverList<WindowObserver> observers_;
« no previous file with comments | « chrome/browser/ui/views/extensions/shell_window_views.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698