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

Side by Side Diff: ash/wm/system_gesture_event_filter.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « ash/wm/system_background_controller.cc ('k') | ash/wm/system_gesture_event_filter_unittest.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 #include "ash/wm/system_gesture_event_filter.h" 5 #include "ash/wm/system_gesture_event_filter.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/metrics/user_metrics_recorder.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/touch/touch_uma.h" 10 #include "ash/touch/touch_uma.h"
11 #include "ash/wm/gestures/overview_gesture_handler.h" 11 #include "ash/wm/gestures/overview_gesture_handler.h"
12 #include "ash/wm/gestures/shelf_gesture_handler.h" 12 #include "ash/wm/gestures/shelf_gesture_handler.h"
13 #include "ui/base/touch/touch_device.h" 13 #include "ui/base/touch/touch_device.h"
14 #include "ui/events/event.h" 14 #include "ui/events/event.h"
15 #include "ui/events/event_constants.h" 15 #include "ui/events/event_constants.h"
16 16
17 namespace ash { 17 namespace ash {
18 18
19 SystemGestureEventFilter::SystemGestureEventFilter() 19 SystemGestureEventFilter::SystemGestureEventFilter()
20 : overview_gesture_handler_(new OverviewGestureHandler), 20 : overview_gesture_handler_(new OverviewGestureHandler),
21 shelf_gesture_handler_(new ShelfGestureHandler()) {} 21 shelf_gesture_handler_(new ShelfGestureHandler()) {}
22 22
23 SystemGestureEventFilter::~SystemGestureEventFilter() { 23 SystemGestureEventFilter::~SystemGestureEventFilter() {}
24 }
25 24
26 void SystemGestureEventFilter::OnMouseEvent(ui::MouseEvent* event) { 25 void SystemGestureEventFilter::OnMouseEvent(ui::MouseEvent* event) {
27 #if defined(OS_CHROMEOS) 26 #if defined(OS_CHROMEOS)
28 if (event->type() == ui::ET_MOUSE_PRESSED && 27 if (event->type() == ui::ET_MOUSE_PRESSED &&
29 ui::GetTouchScreensAvailability() == 28 ui::GetTouchScreensAvailability() ==
30 ui::TouchScreensAvailability::ENABLED) { 29 ui::TouchScreensAvailability::ENABLED) {
31 Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_MOUSE_DOWN); 30 Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_MOUSE_DOWN);
32 } 31 }
33 #endif 32 #endif
34 } 33 }
(...skipping 16 matching lines...) Expand all
51 50
52 if (event->type() == ui::ET_GESTURE_WIN8_EDGE_SWIPE && 51 if (event->type() == ui::ET_GESTURE_WIN8_EDGE_SWIPE &&
53 shelf_gesture_handler_->ProcessGestureEvent(*event, target)) { 52 shelf_gesture_handler_->ProcessGestureEvent(*event, target)) {
54 // Do not stop propagation, since the immersive fullscreen controller may 53 // Do not stop propagation, since the immersive fullscreen controller may
55 // need to handle this event. 54 // need to handle this event.
56 return; 55 return;
57 } 56 }
58 } 57 }
59 58
60 } // namespace ash 59 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/system_background_controller.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698