Roll tools/swarming_client/ to b61a1802f5ef4bb8c7b81060cc80add47e6cf302.
[chromium-blink-merge.git] / ash / touch / touch_hud_projection.h
blob239497624067fd1265377d27e77be3a8aaf3c01e
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
3 // found in the LICENSE file.
5 #ifndef ASH_TOUCH_TOUCH_HUD_PROJECTION_H_
6 #define ASH_TOUCH_TOUCH_HUD_PROJECTION_H_
8 #include <map>
10 #include "ash/touch/touch_observer_hud.h"
12 namespace ash {
13 class TouchPointView;
15 // A heads-up display to show active touch points on the screen. As a derivative
16 // of TouchObserverHUD, objects of this class manage their own lifetime.
17 class TouchHudProjection : public TouchObserverHUD {
18 public:
19 explicit TouchHudProjection(aura::Window* initial_root);
21 // Overriden from TouchObserverHUD.
22 void Clear() override;
24 private:
25 friend class TouchHudProjectionTest;
27 ~TouchHudProjection() override;
29 // Overriden from TouchObserverHUD.
30 void OnTouchEvent(ui::TouchEvent* event) override;
31 void SetHudForRootWindowController(RootWindowController* controller) override;
32 void UnsetHudForRootWindowController(
33 RootWindowController* controller) override;
35 std::map<int, TouchPointView*> points_;
37 DISALLOW_COPY_AND_ASSIGN(TouchHudProjection);
40 } // namespace ash
42 #endif // ASH_TOUCH_TOUCH_HUD_PROJECTION_H_