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

Side by Side Diff: ash/touch/touch_observer_hud.h

Issue 2618143002: cros: Remove some OS platform ifdefs from ash (Closed)
Patch Set: rebase Created 3 years, 11 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/tooltips/tooltip_controller_unittest.cc ('k') | ash/touch/touch_observer_hud.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 (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> 8 #include <stdint.h>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/display/window_tree_host_manager.h" 11 #include "ash/display/window_tree_host_manager.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "ui/display/display_observer.h" 13 #include "ui/display/display_observer.h"
14 #include "ui/display/manager/chromeos/display_configurator.h"
14 #include "ui/events/event_handler.h" 15 #include "ui/events/event_handler.h"
15 #include "ui/views/widget/widget_observer.h" 16 #include "ui/views/widget/widget_observer.h"
16 17
17 #if defined(OS_CHROMEOS)
18 #include "ui/display/manager/chromeos/display_configurator.h"
19 #endif // defined(OS_CHROMEOS)
20
21 namespace views { 18 namespace views {
22 class Widget; 19 class Widget;
23 } 20 }
24 21
25 namespace ash { 22 namespace ash {
26 23
27 // An event filter which handles system level gesture events. Objects of this 24 // An event filter which handles system level gesture events. Objects of this
28 // class manage their own lifetime. 25 // class manage their own lifetime.
29 class ASH_EXPORT TouchObserverHUD 26 class ASH_EXPORT TouchObserverHUD
30 : public ui::EventHandler, 27 : public ui::EventHandler,
31 public views::WidgetObserver, 28 public views::WidgetObserver,
32 public display::DisplayObserver, 29 public display::DisplayObserver,
33 #if defined(OS_CHROMEOS)
34 public display::DisplayConfigurator::Observer, 30 public display::DisplayConfigurator::Observer,
35 #endif // defined(OS_CHROMEOS)
36 public WindowTreeHostManager::Observer { 31 public WindowTreeHostManager::Observer {
37 public: 32 public:
38 // Called to clear touch points and traces from the screen. Default 33 // Called to clear touch points and traces from the screen. Default
39 // implementation does nothing. Sub-classes should implement appropriately. 34 // implementation does nothing. Sub-classes should implement appropriately.
40 virtual void Clear(); 35 virtual void Clear();
41 36
42 // Removes the HUD from the screen. 37 // Removes the HUD from the screen.
43 void Remove(); 38 void Remove();
44 39
45 int64_t display_id() const { return display_id_; } 40 int64_t display_id() const { return display_id_; }
(...skipping 15 matching lines...) Expand all
61 56
62 // Overridden from views::WidgetObserver. 57 // Overridden from views::WidgetObserver.
63 void OnWidgetDestroying(views::Widget* widget) override; 58 void OnWidgetDestroying(views::Widget* widget) override;
64 59
65 // Overridden from display::DisplayObserver. 60 // Overridden from display::DisplayObserver.
66 void OnDisplayAdded(const display::Display& new_display) override; 61 void OnDisplayAdded(const display::Display& new_display) override;
67 void OnDisplayRemoved(const display::Display& old_display) override; 62 void OnDisplayRemoved(const display::Display& old_display) override;
68 void OnDisplayMetricsChanged(const display::Display& display, 63 void OnDisplayMetricsChanged(const display::Display& display,
69 uint32_t metrics) override; 64 uint32_t metrics) override;
70 65
71 #if defined(OS_CHROMEOS)
72 // Overriden from display::DisplayConfigurator::Observer. 66 // Overriden from display::DisplayConfigurator::Observer.
73 void OnDisplayModeChanged( 67 void OnDisplayModeChanged(
74 const display::DisplayConfigurator::DisplayStateList& outputs) override; 68 const display::DisplayConfigurator::DisplayStateList& outputs) override;
75 #endif // defined(OS_CHROMEOS)
76 69
77 // Overriden form WindowTreeHostManager::Observer. 70 // Overriden form WindowTreeHostManager::Observer.
78 void OnDisplaysInitialized() override; 71 void OnDisplaysInitialized() override;
79 void OnDisplayConfigurationChanging() override; 72 void OnDisplayConfigurationChanging() override;
80 void OnDisplayConfigurationChanged() override; 73 void OnDisplayConfigurationChanged() override;
81 74
82 private: 75 private:
83 friend class TouchHudTestBase; 76 friend class TouchHudTestBase;
84 77
85 const int64_t display_id_; 78 const int64_t display_id_;
86 aura::Window* root_window_; 79 aura::Window* root_window_;
87 80
88 views::Widget* widget_; 81 views::Widget* widget_;
89 82
90 DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD); 83 DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD);
91 }; 84 };
92 85
93 } // namespace ash 86 } // namespace ash
94 87
95 #endif // ASH_TOUCH_TOUCH_OBSERVER_HUD_H_ 88 #endif // ASH_TOUCH_TOUCH_OBSERVER_HUD_H_
OLDNEW
« no previous file with comments | « ash/tooltips/tooltip_controller_unittest.cc ('k') | ash/touch/touch_observer_hud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698