| OLD | NEW |
| 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_TOUCH_TOUCH_HUD_DEBUG_H_ | 5 #ifndef ASH_TOUCH_TOUCH_HUD_DEBUG_H_ |
| 6 #define ASH_TOUCH_TOUCH_HUD_DEBUG_H_ | 6 #define ASH_TOUCH_TOUCH_HUD_DEBUG_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // cycles between a fixed number of display modes. | 42 // cycles between a fixed number of display modes. |
| 43 void ChangeToNextMode(); | 43 void ChangeToNextMode(); |
| 44 | 44 |
| 45 // Returns log of touch events as a list value. Each item in the list is a | 45 // Returns log of touch events as a list value. Each item in the list is a |
| 46 // trace of one touch point. | 46 // trace of one touch point. |
| 47 scoped_ptr<base::ListValue> GetLogAsList() const; | 47 scoped_ptr<base::ListValue> GetLogAsList() const; |
| 48 | 48 |
| 49 Mode mode() const { return mode_; } | 49 Mode mode() const { return mode_; } |
| 50 | 50 |
| 51 // Overriden from TouchObserverHUD. | 51 // Overriden from TouchObserverHUD. |
| 52 virtual void Clear() override; | 52 void Clear() override; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 virtual ~TouchHudDebug(); | 55 ~TouchHudDebug() override; |
| 56 | 56 |
| 57 void SetMode(Mode mode); | 57 void SetMode(Mode mode); |
| 58 | 58 |
| 59 void UpdateTouchPointLabel(int index); | 59 void UpdateTouchPointLabel(int index); |
| 60 | 60 |
| 61 // Overriden from TouchObserverHUD. | 61 // Overriden from TouchObserverHUD. |
| 62 virtual void OnTouchEvent(ui::TouchEvent* event) override; | 62 void OnTouchEvent(ui::TouchEvent* event) override; |
| 63 virtual void OnDisplayMetricsChanged(const gfx::Display& display, | 63 void OnDisplayMetricsChanged(const gfx::Display& display, |
| 64 uint32_t metrics) override; | 64 uint32_t metrics) override; |
| 65 virtual void SetHudForRootWindowController( | 65 void SetHudForRootWindowController(RootWindowController* controller) override; |
| 66 RootWindowController* controller) override; | 66 void UnsetHudForRootWindowController( |
| 67 virtual void UnsetHudForRootWindowController( | |
| 68 RootWindowController* controller) override; | 67 RootWindowController* controller) override; |
| 69 | 68 |
| 70 static const int kMaxTouchPoints = 32; | 69 static const int kMaxTouchPoints = 32; |
| 71 | 70 |
| 72 Mode mode_; | 71 Mode mode_; |
| 73 | 72 |
| 74 scoped_ptr<TouchLog> touch_log_; | 73 scoped_ptr<TouchLog> touch_log_; |
| 75 | 74 |
| 76 TouchHudCanvas* canvas_; | 75 TouchHudCanvas* canvas_; |
| 77 views::View* label_container_; | 76 views::View* label_container_; |
| 78 views::Label* touch_labels_[kMaxTouchPoints]; | 77 views::Label* touch_labels_[kMaxTouchPoints]; |
| 79 | 78 |
| 80 DISALLOW_COPY_AND_ASSIGN(TouchHudDebug); | 79 DISALLOW_COPY_AND_ASSIGN(TouchHudDebug); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace ash | 82 } // namespace ash |
| 84 | 83 |
| 85 #endif // ASH_TOUCH_TOUCH_HUD_DEBUG_H_ | 84 #endif // ASH_TOUCH_TOUCH_HUD_DEBUG_H_ |
| OLD | NEW |