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

Side by Side Diff: ash/shelf/shelf_bezel_event_filter.h

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/shelf/shelf.cc ('k') | ash/shelf/shelf_bezel_event_filter.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_ 5 #ifndef ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_
6 #define ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_ 6 #define ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_
7 7
8 #include "ash/wm/gestures/shelf_gesture_handler.h" 8 #include "ash/wm/gestures/shelf_gesture_handler.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/events/event_handler.h" 10 #include "ui/events/event_handler.h"
11 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 12
13 namespace ash { 13 namespace ash {
14 class ShelfLayoutManager; 14 class ShelfLayoutManager;
15 15
16 // Detects and forwards touch gestures that occur on a bezel sensor to the 16 // Detects and forwards touch gestures that occur on a bezel sensor to the
17 // shelf. 17 // shelf.
18 class ShelfBezelEventFilter : public ui::EventHandler { 18 class ShelfBezelEventFilter : public ui::EventHandler {
19 public: 19 public:
20 explicit ShelfBezelEventFilter(ShelfLayoutManager* shelf); 20 explicit ShelfBezelEventFilter(ShelfLayoutManager* shelf);
21 ~ShelfBezelEventFilter() override; 21 ~ShelfBezelEventFilter() override;
22 22
23 // Overridden from ui::EventHandler: 23 // Overridden from ui::EventHandler:
24 void OnGestureEvent(ui::GestureEvent* event) override; 24 void OnGestureEvent(ui::GestureEvent* event) override;
25 25
26 private: 26 private:
27 bool IsShelfOnBezel(const gfx::Rect& screen, 27 bool IsShelfOnBezel(const gfx::Rect& screen, const gfx::Point& point) const;
28 const gfx::Point& point) const;
29 28
30 ShelfLayoutManager* shelf_; // non-owned 29 ShelfLayoutManager* shelf_; // non-owned
31 bool in_touch_drag_; 30 bool in_touch_drag_;
32 ShelfGestureHandler gesture_handler_; 31 ShelfGestureHandler gesture_handler_;
33 DISALLOW_COPY_AND_ASSIGN(ShelfBezelEventFilter); 32 DISALLOW_COPY_AND_ASSIGN(ShelfBezelEventFilter);
34 }; 33 };
35 34
36 } // namespace ash 35 } // namespace ash
37 36
38 #endif // ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_ 37 #endif // ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf.cc ('k') | ash/shelf/shelf_bezel_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698