OLD | NEW |
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 #ifndef ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ | 5 #ifndef ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ |
6 #define ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ | 6 #define ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ |
7 | 7 |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ui/base/events/event_handler.h" | 9 #include "ui/base/events/event_handler.h" |
10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class TouchObserverHUD : public ui::EventHandler, | 28 class TouchObserverHUD : public ui::EventHandler, |
29 public views::WidgetObserver { | 29 public views::WidgetObserver { |
30 public: | 30 public: |
31 TouchObserverHUD(); | 31 TouchObserverHUD(); |
32 virtual ~TouchObserverHUD(); | 32 virtual ~TouchObserverHUD(); |
33 | 33 |
34 private: | 34 private: |
35 void UpdateTouchPointLabel(int index); | 35 void UpdateTouchPointLabel(int index); |
36 | 36 |
37 // Overriden from ui::EventHandler: | 37 // Overriden from ui::EventHandler: |
38 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 38 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
39 | 39 |
40 // Overridden from views::WidgetObserver: | 40 // Overridden from views::WidgetObserver: |
41 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; | 41 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; |
42 | 42 |
43 static const int kMaxTouchPoints = 32; | 43 static const int kMaxTouchPoints = 32; |
44 | 44 |
45 views::Widget* widget_; | 45 views::Widget* widget_; |
46 TouchHudCanvas* canvas_; | 46 TouchHudCanvas* canvas_; |
47 views::Label* touch_labels_[kMaxTouchPoints]; | 47 views::Label* touch_labels_[kMaxTouchPoints]; |
48 gfx::Point touch_positions_[kMaxTouchPoints]; | 48 gfx::Point touch_positions_[kMaxTouchPoints]; |
49 ui::EventType touch_status_[kMaxTouchPoints]; | 49 ui::EventType touch_status_[kMaxTouchPoints]; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD); | 51 DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD); |
52 }; | 52 }; |
53 | 53 |
54 } // namespace internal | 54 } // namespace internal |
55 } // namespace ash | 55 } // namespace ash |
56 | 56 |
57 #endif // ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ | 57 #endif // ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ |
OLD | NEW |