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

Side by Side Diff: ash/pointer_watcher_delegate_aura.cc

Issue 2239743004: Palette tool laser prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch
Patch Set: Fixed patch set 3 errors. Created 4 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 unified diff | Download patch
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 "ash/pointer_watcher_delegate_aura.h" 5 #include "ash/pointer_watcher_delegate_aura.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ui/aura/client/screen_position_client.h" 8 #include "ui/aura/client/screen_position_client.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) { 47 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) {
48 FOR_EACH_OBSERVER(views::PointerWatcher, non_move_watchers_, 48 FOR_EACH_OBSERVER(views::PointerWatcher, non_move_watchers_,
49 OnMouseCaptureChanged()); 49 OnMouseCaptureChanged());
50 FOR_EACH_OBSERVER(views::PointerWatcher, move_watchers_, 50 FOR_EACH_OBSERVER(views::PointerWatcher, move_watchers_,
51 OnMouseCaptureChanged()); 51 OnMouseCaptureChanged());
52 return; 52 return;
53 } 53 }
54 54
55 // For compatibility with the mus version, don't send drags. 55 // For compatibility with the mus version, don't send drags.
56 if (event->type() != ui::ET_MOUSE_PRESSED && 56 if (event->type() != ui::ET_MOUSE_PRESSED &&
57 event->type() != ui::ET_MOUSE_RELEASED && 57 event->type() != ui::ET_MOUSE_RELEASED)
58 event->type() != ui::ET_MOUSE_MOVED)
59 return; 58 return;
60 59
61 DCHECK(ui::PointerEvent::CanConvertFrom(*event)); 60 DCHECK(ui::PointerEvent::CanConvertFrom(*event));
62 NotifyWatchers(ui::PointerEvent(*event), *event); 61 NotifyWatchers(ui::PointerEvent(*event), *event);
63 } 62 }
64 63
65 void PointerWatcherDelegateAura::OnTouchEvent(ui::TouchEvent* event) { 64 void PointerWatcherDelegateAura::OnTouchEvent(ui::TouchEvent* event) {
66 // For compatibility with the mus version, don't send drags. 65 // For compatibility with the mus version, don't send drags.
67 if (event->type() != ui::ET_TOUCH_PRESSED && 66 if (event->type() != ui::ET_TOUCH_PRESSED &&
68 event->type() != ui::ET_TOUCH_RELEASED) 67 event->type() != ui::ET_TOUCH_RELEASED)
(...skipping 27 matching lines...) Expand all
96 views::PointerWatcher, move_watchers_, 95 views::PointerWatcher, move_watchers_,
97 OnPointerEventObserved(event, screen_location, target_widget)); 96 OnPointerEventObserved(event, screen_location, target_widget));
98 if (event.type() != ui::ET_POINTER_MOVED) { 97 if (event.type() != ui::ET_POINTER_MOVED) {
99 FOR_EACH_OBSERVER( 98 FOR_EACH_OBSERVER(
100 views::PointerWatcher, non_move_watchers_, 99 views::PointerWatcher, non_move_watchers_,
101 OnPointerEventObserved(event, screen_location, target_widget)); 100 OnPointerEventObserved(event, screen_location, target_widget));
102 } 101 }
103 } 102 }
104 103
105 } // namespace ash 104 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698