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

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

Issue 10479010: Gesture related changes for views: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 const NativeWidget* native_widget() const; 559 const NativeWidget* native_widget() const;
560 NativeWidget* native_widget(); 560 NativeWidget* native_widget();
561 561
562 internal::NativeWidgetPrivate* native_widget_private() { 562 internal::NativeWidgetPrivate* native_widget_private() {
563 return native_widget_; 563 return native_widget_;
564 } 564 }
565 const internal::NativeWidgetPrivate* native_widget_private() const { 565 const internal::NativeWidgetPrivate* native_widget_private() const {
566 return native_widget_; 566 return native_widget_;
567 } 567 }
568 568
569 // Sets mouse capture on the specified view. 569 // Sets capture to the specified view. This makes it so that all mouse, touch
570 void SetMouseCapture(views::View* view); 570 // and gesture events go to |view|.
571 void SetCapture(views::View* view);
571 572
572 // Releases mouse capture. 573 // Releases capture.
573 void ReleaseMouseCapture(); 574 void ReleaseCapture();
574 575
575 // Returns the current event being processed. If there are multiple events 576 // Returns the current event being processed. If there are multiple events
576 // being processed at the same time (e.g. one event triggers another event), 577 // being processed at the same time (e.g. one event triggers another event),
577 // then the most recent event is returned. Returns NULL if no event is being 578 // then the most recent event is returned. Returns NULL if no event is being
578 // processed. 579 // processed.
579 const Event* GetCurrentEvent(); 580 const Event* GetCurrentEvent();
580 581
581 // Invoked when the tooltip text changes for the specified views. 582 // Invoked when the tooltip text changes for the specified views.
582 void TooltipTextChanged(View* view); 583 void TooltipTextChanged(View* view);
583 584
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 // Tracks whether native widget has been initialized. 767 // Tracks whether native widget has been initialized.
767 bool native_widget_initialized_; 768 bool native_widget_initialized_;
768 769
769 // Whether native widget has been destroyed. 770 // Whether native widget has been destroyed.
770 bool native_widget_destroyed_; 771 bool native_widget_destroyed_;
771 772
772 // TODO(beng): Remove NativeWidgetGtk's dependence on these: 773 // TODO(beng): Remove NativeWidgetGtk's dependence on these:
773 // If true, the mouse is currently down. 774 // If true, the mouse is currently down.
774 bool is_mouse_button_pressed_; 775 bool is_mouse_button_pressed_;
775 776
777 // If true, a touch device is currently down.
778 bool is_touch_down_;
779
776 // TODO(beng): Remove NativeWidgetGtk's dependence on these: 780 // TODO(beng): Remove NativeWidgetGtk's dependence on these:
777 // The following are used to detect duplicate mouse move events and not 781 // The following are used to detect duplicate mouse move events and not
778 // deliver them. Displaying a window may result in the system generating 782 // deliver them. Displaying a window may result in the system generating
779 // duplicate move events even though the mouse hasn't moved. 783 // duplicate move events even though the mouse hasn't moved.
780 bool last_mouse_event_was_move_; 784 bool last_mouse_event_was_move_;
781 gfx::Point last_mouse_event_position_; 785 gfx::Point last_mouse_event_position_;
782 786
783 DISALLOW_COPY_AND_ASSIGN(Widget); 787 DISALLOW_COPY_AND_ASSIGN(Widget);
784 }; 788 };
785 789
786 } // namespace views 790 } // namespace views
787 791
788 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 792 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698