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

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

Issue 1748903003: Resets hover state when ToolbarActionView is dragged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resets hover state when ToolbarActionView is dragged (added a test) Created 4 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc ('k') | no next file » | 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_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 7
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 #include <vector> 10 #include <vector>
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 int operation, 589 int operation,
590 ui::DragDropTypes::DragEventSource source); 590 ui::DragDropTypes::DragEventSource source);
591 591
592 // Returns the view that requested the current drag operation via 592 // Returns the view that requested the current drag operation via
593 // RunShellDrag(), or NULL if there is no such view or drag operation. 593 // RunShellDrag(), or NULL if there is no such view or drag operation.
594 View* dragged_view() { 594 View* dragged_view() {
595 return const_cast<View*>(const_cast<const Widget*>(this)->dragged_view()); 595 return const_cast<View*>(const_cast<const Widget*>(this)->dragged_view());
596 } 596 }
597 const View* dragged_view() const { return dragged_view_; } 597 const View* dragged_view() const { return dragged_view_; }
598 598
599 // Unit tests may temporarily set |dragged_view| to simulate a drag.
600 void set_dragged_view(View* dragged_view) { dragged_view_ = dragged_view; }
sky 2016/03/01 03:58:48 Exposing api like this, especially when it doesn't
varkha 2016/03/01 04:03:34 I've tried that (making it private and making Tool
varkha 2016/03/01 04:58:53 Done. Just needed to mention that the friend test
601
599 // Adds the specified |rect| in client area coordinates to the rectangle to be 602 // Adds the specified |rect| in client area coordinates to the rectangle to be
600 // redrawn. 603 // redrawn.
601 virtual void SchedulePaintInRect(const gfx::Rect& rect); 604 virtual void SchedulePaintInRect(const gfx::Rect& rect);
602 605
603 // Sets the currently visible cursor. If |cursor| is NULL, the cursor used 606 // Sets the currently visible cursor. If |cursor| is NULL, the cursor used
604 // before the current is restored. 607 // before the current is restored.
605 void SetCursor(gfx::NativeCursor cursor); 608 void SetCursor(gfx::NativeCursor cursor);
606 609
607 // Returns true if and only if mouse events are enabled. 610 // Returns true if and only if mouse events are enabled.
608 bool IsMouseEventsEnabled() const; 611 bool IsMouseEventsEnabled() const;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 bool movement_disabled_; 971 bool movement_disabled_;
969 972
970 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; 973 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
971 974
972 DISALLOW_COPY_AND_ASSIGN(Widget); 975 DISALLOW_COPY_AND_ASSIGN(Widget);
973 }; 976 };
974 977
975 } // namespace views 978 } // namespace views
976 979
977 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 980 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698