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

Side by Side Diff: ui/views/animation/ink_drop_host_view.cc

Issue 2925853002: Flag mouse messages received when cursor is hidden.
Patch Set: Rebase Created 3 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
« no previous file with comments | « ui/platform_window/win/win_window.cc ('k') | ui/views/controls/button/custom_button.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "ui/views/animation/ink_drop_host_view.h" 5 #include "ui/views/animation/ink_drop_host_view.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "ui/events/event.h" 8 #include "ui/events/event.h"
9 #include "ui/events/scoped_target_handler.h" 9 #include "ui/events/scoped_target_handler.h"
10 #include "ui/gfx/color_palette.h" 10 #include "ui/gfx/color_palette.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 void InkDropHostView::OnBlur() { 243 void InkDropHostView::OnBlur() {
244 views::View::OnBlur(); 244 views::View::OnBlur();
245 GetInkDrop()->SetFocused(false); 245 GetInkDrop()->SetFocused(false);
246 } 246 }
247 247
248 void InkDropHostView::OnMouseEvent(ui::MouseEvent* event) { 248 void InkDropHostView::OnMouseEvent(ui::MouseEvent* event) {
249 switch (event->type()) { 249 switch (event->type()) {
250 case ui::ET_MOUSE_ENTERED: 250 case ui::ET_MOUSE_ENTERED:
251 GetInkDrop()->SetHovered(true); 251 if (!(event->flags() & ui::EF_CURSOR_HIDDEN))
252 GetInkDrop()->SetHovered(true);
252 break; 253 break;
253 case ui::ET_MOUSE_EXITED: 254 case ui::ET_MOUSE_EXITED:
254 GetInkDrop()->SetHovered(false); 255 GetInkDrop()->SetHovered(false);
255 break; 256 break;
256 case ui::ET_MOUSE_DRAGGED: 257 case ui::ET_MOUSE_DRAGGED:
257 GetInkDrop()->SetHovered(GetLocalBounds().Contains(event->location())); 258 GetInkDrop()->SetHovered(GetLocalBounds().Contains(event->location()));
258 break; 259 break;
259 default: 260 default:
260 break; 261 break;
261 } 262 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 std::unique_ptr<InkDropImpl> 311 std::unique_ptr<InkDropImpl>
311 InkDropHostView::CreateDefaultFloodFillInkDropImpl() { 312 InkDropHostView::CreateDefaultFloodFillInkDropImpl() {
312 std::unique_ptr<views::InkDropImpl> ink_drop = 313 std::unique_ptr<views::InkDropImpl> ink_drop =
313 InkDropHostView::CreateDefaultInkDropImpl(); 314 InkDropHostView::CreateDefaultInkDropImpl();
314 ink_drop->SetAutoHighlightMode( 315 ink_drop->SetAutoHighlightMode(
315 views::InkDropImpl::AutoHighlightMode::SHOW_ON_RIPPLE); 316 views::InkDropImpl::AutoHighlightMode::SHOW_ON_RIPPLE);
316 return ink_drop; 317 return ink_drop;
317 } 318 }
318 319
319 } // namespace views 320 } // namespace views
OLDNEW
« no previous file with comments | « ui/platform_window/win/win_window.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698