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

Side by Side Diff: ui/aura/env.cc

Issue 2854663002: Make EnvInputStateController owned by aura::Env. (Closed)
Patch Set: Created 3 years, 7 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 | « ui/aura/env.h ('k') | ui/aura/window_event_dispatcher.h » ('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 #include "ui/aura/env.h" 5 #include "ui/aura/env.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
11 #include "ui/aura/client/aura_constants.h" 11 #include "ui/aura/client/aura_constants.h"
12 #include "ui/aura/env_input_state_controller.h"
12 #include "ui/aura/env_observer.h" 13 #include "ui/aura/env_observer.h"
13 #include "ui/aura/input_state_lookup.h" 14 #include "ui/aura/input_state_lookup.h"
14 #include "ui/aura/mus/mus_types.h" 15 #include "ui/aura/mus/mus_types.h"
15 #include "ui/aura/mus/os_exchange_data_provider_mus.h" 16 #include "ui/aura/mus/os_exchange_data_provider_mus.h"
16 #include "ui/aura/mus/window_port_mus.h" 17 #include "ui/aura/mus/window_port_mus.h"
17 #include "ui/aura/mus/window_tree_client.h" 18 #include "ui/aura/mus/window_tree_client.h"
18 #include "ui/aura/window.h" 19 #include "ui/aura/window.h"
19 #include "ui/aura/window_port_local.h" 20 #include "ui/aura/window_port_local.h"
20 #include "ui/events/event_target_iterator.h" 21 #include "ui/events/event_target_iterator.h"
21 #include "ui/events/platform/platform_event_source.h" 22 #include "ui/events/platform/platform_event_source.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // the value after the fact, to do that use EnvTestHelper. 133 // the value after the fact, to do that use EnvTestHelper.
133 DCHECK(!window_tree_client_); 134 DCHECK(!window_tree_client_);
134 window_tree_client_ = window_tree_client; 135 window_tree_client_ = window_tree_client;
135 } 136 }
136 137
137 //////////////////////////////////////////////////////////////////////////////// 138 ////////////////////////////////////////////////////////////////////////////////
138 // Env, private: 139 // Env, private:
139 140
140 Env::Env(Mode mode) 141 Env::Env(Mode mode)
141 : mode_(mode), 142 : mode_(mode),
143 env_controller_(new EnvInputStateController),
142 mouse_button_flags_(0), 144 mouse_button_flags_(0),
143 is_touch_down_(false), 145 is_touch_down_(false),
144 get_last_mouse_location_from_mus_(mode_ == Mode::MUS), 146 get_last_mouse_location_from_mus_(mode_ == Mode::MUS),
145 input_state_lookup_(InputStateLookup::Create()), 147 input_state_lookup_(InputStateLookup::Create()),
146 #if defined(USE_OZONE) 148 #if defined(USE_OZONE)
147 native_pixmap_factory_(ui::CreateClientNativePixmapFactoryOzone()), 149 native_pixmap_factory_(ui::CreateClientNativePixmapFactoryOzone()),
148 #endif 150 #endif
149 context_factory_(nullptr), 151 context_factory_(nullptr),
150 context_factory_private_(nullptr) { 152 context_factory_private_(nullptr) {
151 DCHECK(lazy_tls_ptr.Pointer()->Get() == NULL); 153 DCHECK(lazy_tls_ptr.Pointer()->Get() == NULL);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 ui::EventTargeter* Env::GetEventTargeter() { 215 ui::EventTargeter* Env::GetEventTargeter() {
214 NOTREACHED(); 216 NOTREACHED();
215 return NULL; 217 return NULL;
216 } 218 }
217 219
218 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() { 220 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() {
219 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); 221 return base::MakeUnique<aura::OSExchangeDataProviderMus>();
220 } 222 }
221 223
222 } // namespace aura 224 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/env.h ('k') | ui/aura/window_event_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698