| 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 <stdint.h> |
| 9 |
| 8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 9 #include "ash/display/window_tree_host_manager.h" | 11 #include "ash/display/window_tree_host_manager.h" |
| 12 #include "base/macros.h" |
| 10 #include "ui/events/event_handler.h" | 13 #include "ui/events/event_handler.h" |
| 11 #include "ui/gfx/display_observer.h" | 14 #include "ui/gfx/display_observer.h" |
| 12 #include "ui/views/widget/widget_observer.h" | 15 #include "ui/views/widget/widget_observer.h" |
| 13 | 16 |
| 14 #if defined(OS_CHROMEOS) | 17 #if defined(OS_CHROMEOS) |
| 15 #include "ui/display/chromeos/display_configurator.h" | 18 #include "ui/display/chromeos/display_configurator.h" |
| 16 #endif // defined(OS_CHROMEOS) | 19 #endif // defined(OS_CHROMEOS) |
| 17 | 20 |
| 18 namespace views { | 21 namespace views { |
| 19 class Widget; | 22 class Widget; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 31 #endif // defined(OS_CHROMEOS) | 34 #endif // defined(OS_CHROMEOS) |
| 32 public WindowTreeHostManager::Observer { | 35 public WindowTreeHostManager::Observer { |
| 33 public: | 36 public: |
| 34 // Called to clear touch points and traces from the screen. Default | 37 // Called to clear touch points and traces from the screen. Default |
| 35 // implementation does nothing. Sub-classes should implement appropriately. | 38 // implementation does nothing. Sub-classes should implement appropriately. |
| 36 virtual void Clear(); | 39 virtual void Clear(); |
| 37 | 40 |
| 38 // Removes the HUD from the screen. | 41 // Removes the HUD from the screen. |
| 39 void Remove(); | 42 void Remove(); |
| 40 | 43 |
| 41 int64 display_id() const { return display_id_; } | 44 int64_t display_id() const { return display_id_; } |
| 42 | 45 |
| 43 protected: | 46 protected: |
| 44 explicit TouchObserverHUD(aura::Window* initial_root); | 47 explicit TouchObserverHUD(aura::Window* initial_root); |
| 45 | 48 |
| 46 ~TouchObserverHUD() override; | 49 ~TouchObserverHUD() override; |
| 47 | 50 |
| 48 virtual void SetHudForRootWindowController( | 51 virtual void SetHudForRootWindowController( |
| 49 RootWindowController* controller) = 0; | 52 RootWindowController* controller) = 0; |
| 50 virtual void UnsetHudForRootWindowController( | 53 virtual void UnsetHudForRootWindowController( |
| 51 RootWindowController* controller) = 0; | 54 RootWindowController* controller) = 0; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 71 #endif // defined(OS_CHROMEOS) | 74 #endif // defined(OS_CHROMEOS) |
| 72 | 75 |
| 73 // Overriden form WindowTreeHostManager::Observer. | 76 // Overriden form WindowTreeHostManager::Observer. |
| 74 void OnDisplaysInitialized() override; | 77 void OnDisplaysInitialized() override; |
| 75 void OnDisplayConfigurationChanging() override; | 78 void OnDisplayConfigurationChanging() override; |
| 76 void OnDisplayConfigurationChanged() override; | 79 void OnDisplayConfigurationChanged() override; |
| 77 | 80 |
| 78 private: | 81 private: |
| 79 friend class TouchHudTestBase; | 82 friend class TouchHudTestBase; |
| 80 | 83 |
| 81 const int64 display_id_; | 84 const int64_t display_id_; |
| 82 aura::Window* root_window_; | 85 aura::Window* root_window_; |
| 83 | 86 |
| 84 views::Widget* widget_; | 87 views::Widget* widget_; |
| 85 | 88 |
| 86 DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD); | 89 DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 } // namespace ash | 92 } // namespace ash |
| 90 | 93 |
| 91 #endif // ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ | 94 #endif // ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ |
| OLD | NEW |