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 UI_AURA_ENV_H_ | 5 #ifndef UI_AURA_ENV_H_ |
6 #define UI_AURA_ENV_H_ | 6 #define UI_AURA_ENV_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
13 #include "base/supports_user_data.h" | 12 #include "base/supports_user_data.h" |
14 #include "ui/aura/aura_export.h" | 13 #include "ui/aura/aura_export.h" |
15 #include "ui/events/event_handler.h" | 14 #include "ui/events/event_handler.h" |
16 #include "ui/events/event_target.h" | 15 #include "ui/events/event_target.h" |
17 #include "ui/gfx/geometry/point.h" | 16 #include "ui/gfx/geometry/point.h" |
18 | 17 |
19 namespace ui { | 18 namespace ui { |
20 class ContextFactory; | 19 class ContextFactory; |
21 class PlatformEventSource; | 20 class PlatformEventSource; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 80 |
82 // Called by the WindowTreeHost when it is initialized. Notifies observers. | 81 // Called by the WindowTreeHost when it is initialized. Notifies observers. |
83 void NotifyHostInitialized(WindowTreeHost* host); | 82 void NotifyHostInitialized(WindowTreeHost* host); |
84 | 83 |
85 // Invoked by WindowTreeHost when it is activated. Notifies observers. | 84 // Invoked by WindowTreeHost when it is activated. Notifies observers. |
86 void NotifyHostActivated(WindowTreeHost* host); | 85 void NotifyHostActivated(WindowTreeHost* host); |
87 | 86 |
88 // Overridden from ui::EventTarget: | 87 // Overridden from ui::EventTarget: |
89 bool CanAcceptEvent(const ui::Event& event) override; | 88 bool CanAcceptEvent(const ui::Event& event) override; |
90 ui::EventTarget* GetParentTarget() override; | 89 ui::EventTarget* GetParentTarget() override; |
91 scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override; | 90 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override; |
92 ui::EventTargeter* GetEventTargeter() override; | 91 ui::EventTargeter* GetEventTargeter() override; |
93 | 92 |
94 base::ObserverList<EnvObserver> observers_; | 93 base::ObserverList<EnvObserver> observers_; |
95 | 94 |
96 int mouse_button_flags_; | 95 int mouse_button_flags_; |
97 // Location of last mouse event, in screen coordinates. | 96 // Location of last mouse event, in screen coordinates. |
98 gfx::Point last_mouse_location_; | 97 gfx::Point last_mouse_location_; |
99 bool is_touch_down_; | 98 bool is_touch_down_; |
100 | 99 |
101 scoped_ptr<InputStateLookup> input_state_lookup_; | 100 std::unique_ptr<InputStateLookup> input_state_lookup_; |
102 scoped_ptr<ui::PlatformEventSource> event_source_; | 101 std::unique_ptr<ui::PlatformEventSource> event_source_; |
103 | 102 |
104 ui::ContextFactory* context_factory_; | 103 ui::ContextFactory* context_factory_; |
105 | 104 |
106 DISALLOW_COPY_AND_ASSIGN(Env); | 105 DISALLOW_COPY_AND_ASSIGN(Env); |
107 }; | 106 }; |
108 | 107 |
109 } // namespace aura | 108 } // namespace aura |
110 | 109 |
111 #endif // UI_AURA_ENV_H_ | 110 #endif // UI_AURA_ENV_H_ |
OLD | NEW |