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

Side by Side Diff: ui/aura/window.h

Issue 27458002: Allow setting different hit test bounds overrides for mouse and touch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/panels/panel_frame_view.cc ('k') | ui/aura/window.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_AURA_WINDOW_H_ 5 #ifndef UI_AURA_WINDOW_H_
6 #define UI_AURA_WINDOW_H_ 6 #define UI_AURA_WINDOW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 gfx::Insets hit_test_bounds_override_outer_touch() const { 249 gfx::Insets hit_test_bounds_override_outer_touch() const {
250 return hit_test_bounds_override_outer_touch_; 250 return hit_test_bounds_override_outer_touch_;
251 } 251 }
252 252
253 gfx::Insets hit_test_bounds_override_outer_mouse() const { 253 gfx::Insets hit_test_bounds_override_outer_mouse() const {
254 return hit_test_bounds_override_outer_mouse_; 254 return hit_test_bounds_override_outer_mouse_;
255 } 255 }
256 256
257 // Sets the window to grab hits for an area extending |insets| pixels inside 257 // Sets the window to grab hits for mouse and touch for an area extending
258 // its bounds (even if that inner region overlaps a child window). This can be 258 // |mouse_insets| and |touch_insets| pixels inside its bounds (even if that
259 // used to create an invisible non-client area that overlaps the client area. 259 // inner region overlaps a child window). This can be used to create an
260 void set_hit_test_bounds_override_inner(const gfx::Insets& insets) { 260 // invisible non-client area that overlaps the client area.
261 hit_test_bounds_override_inner_ = insets; 261 void SetHitTestBoundsOverrideInner(const gfx::Insets& mouse_insets,
Ben Goodger (Google) 2013/10/17 23:04:48 Can we try and remove this from Window? I'm tryin
262 const gfx::Insets& touch_insets) {
263 hit_test_bounds_override_inner_mouse_ = mouse_insets;
264 hit_test_bounds_override_inner_touch_ = touch_insets;
262 } 265 }
263 gfx::Insets hit_test_bounds_override_inner() const { 266
264 return hit_test_bounds_override_inner_; 267 gfx::Insets hit_test_bounds_override_inner_touch() const {
268 return hit_test_bounds_override_inner_touch_;
269 }
270
271 gfx::Insets hit_test_bounds_override_inner_mouse() const {
272 return hit_test_bounds_override_inner_mouse_;
265 } 273 }
266 274
267 // Returns true if the |point_in_root| in root window's coordinate falls 275 // Returns true if the |point_in_root| in root window's coordinate falls
268 // within this window's bounds. Returns false if the window is detached 276 // within this window's bounds. Returns false if the window is detached
269 // from root window. 277 // from root window.
270 bool ContainsPointInRoot(const gfx::Point& point_in_root) const; 278 bool ContainsPointInRoot(const gfx::Point& point_in_root) const;
271 279
272 // Returns true if relative-to-this-Window's-origin |local_point| falls 280 // Returns true if relative-to-this-Window's-origin |local_point| falls
273 // within this Window's bounds. 281 // within this Window's bounds.
274 bool ContainsPoint(const gfx::Point& local_point) const; 282 bool ContainsPoint(const gfx::Point& local_point) const;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 bool transparent_; 517 bool transparent_;
510 518
511 scoped_ptr<ui::EventHandler> event_filter_; 519 scoped_ptr<ui::EventHandler> event_filter_;
512 scoped_ptr<LayoutManager> layout_manager_; 520 scoped_ptr<LayoutManager> layout_manager_;
513 521
514 void* user_data_; 522 void* user_data_;
515 523
516 // Makes the window pass all events through to any windows behind it. 524 // Makes the window pass all events through to any windows behind it.
517 bool ignore_events_; 525 bool ignore_events_;
518 526
519 // See set_hit_test_outer_override(). 527 // See SetHitTestBoundsOverrideOuter() and SetHitTestBoundsOverrideInner().
520 gfx::Insets hit_test_bounds_override_outer_mouse_; 528 gfx::Insets hit_test_bounds_override_outer_mouse_;
521 gfx::Insets hit_test_bounds_override_outer_touch_; 529 gfx::Insets hit_test_bounds_override_outer_touch_;
522 gfx::Insets hit_test_bounds_override_inner_; 530 gfx::Insets hit_test_bounds_override_inner_mouse_;
531 gfx::Insets hit_test_bounds_override_inner_touch_;
523 532
524 ObserverList<WindowObserver> observers_; 533 ObserverList<WindowObserver> observers_;
525 534
526 // Value struct to keep the name and deallocator for this property. 535 // Value struct to keep the name and deallocator for this property.
527 // Key cannot be used for this purpose because it can be char* or 536 // Key cannot be used for this purpose because it can be char* or
528 // WindowProperty<>. 537 // WindowProperty<>.
529 struct Value { 538 struct Value {
530 const char* name; 539 const char* name;
531 int64 value; 540 int64 value;
532 PropertyDeallocator deallocator; 541 PropertyDeallocator deallocator;
533 }; 542 };
534 543
535 std::map<const void*, Value> prop_map_; 544 std::map<const void*, Value> prop_map_;
536 545
537 DISALLOW_COPY_AND_ASSIGN(Window); 546 DISALLOW_COPY_AND_ASSIGN(Window);
538 }; 547 };
539 548
540 } // namespace aura 549 } // namespace aura
541 550
542 #endif // UI_AURA_WINDOW_H_ 551 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/panels/panel_frame_view.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698