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

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

Issue 2237613002: mash: Migrate some misc ShelfLayoutManager deps to ash common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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
« no previous file with comments | « ash/shelf/shelf_bezel_event_filter.cc ('k') | ash/shelf/shelf_bezel_event_handler.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_HANDLER_H_
6 #define ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_ 6 #define ASH_SHELF_SHELF_BEZEL_EVENT_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/events/event_handler.h" 9 #include "ui/events/event_handler.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 class Point; 12 class Point;
13 class Rect; 13 class Rect;
14 } 14 }
15 15
16 namespace ash { 16 namespace ash {
17 class ShelfLayoutManager; 17 class WmShelf;
18 18
19 // Detects and forwards touch gestures that occur on a bezel sensor to the 19 // Forwards touch gestures on a bezel sensor to the shelf.
20 // shelf. 20 class ShelfBezelEventHandler : public ui::EventHandler {
21 class ShelfBezelEventFilter : public ui::EventHandler {
22 public: 21 public:
23 explicit ShelfBezelEventFilter(ShelfLayoutManager* shelf_layout_manager); 22 explicit ShelfBezelEventHandler(WmShelf* shelf);
24 ~ShelfBezelEventFilter() override; 23 ~ShelfBezelEventHandler() override;
25 24
26 // Overridden from ui::EventHandler: 25 // Overridden from ui::EventHandler:
27 void OnGestureEvent(ui::GestureEvent* event) override; 26 void OnGestureEvent(ui::GestureEvent* event) override;
28 27
29 private: 28 private:
30 bool IsShelfOnBezel(const gfx::Rect& screen, const gfx::Point& point) const; 29 bool IsShelfOnBezel(const gfx::Rect& screen, const gfx::Point& point) const;
31 30
32 ShelfLayoutManager* shelf_layout_manager_; 31 WmShelf* shelf_;
33 bool in_touch_drag_; 32 bool in_touch_drag_;
34 33
35 DISALLOW_COPY_AND_ASSIGN(ShelfBezelEventFilter); 34 DISALLOW_COPY_AND_ASSIGN(ShelfBezelEventHandler);
36 }; 35 };
37 36
38 } // namespace ash 37 } // namespace ash
39 38
40 #endif // ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_ 39 #endif // ASH_SHELF_SHELF_BEZEL_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_bezel_event_filter.cc ('k') | ash/shelf/shelf_bezel_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698