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

Side by Side Diff: ui/wm/core/wm_state.cc

Issue 243013006: events: Move the PlatformEventSource creation in aura::Env. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/wm/core/wm_state.h ('k') | ui/wm/test/wm_test_helper.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/wm/core/wm_state.h" 5 #include "ui/wm/core/wm_state.h"
6 6
7 #include "ui/events/platform/platform_event_source.h" 7 #include "ui/events/platform/platform_event_source.h"
8 #include "ui/wm/core/transient_window_controller.h" 8 #include "ui/wm/core/transient_window_controller.h"
9 #include "ui/wm/core/transient_window_stacking_client.h" 9 #include "ui/wm/core/transient_window_stacking_client.h"
10 10
11 namespace wm { 11 namespace wm {
12 12
13 WMState::WMState() 13 WMState::WMState()
14 : window_stacking_client_(new TransientWindowStackingClient), 14 : window_stacking_client_(new TransientWindowStackingClient),
15 transient_window_client_(new TransientWindowController) { 15 transient_window_client_(new TransientWindowController) {
16 aura::client::SetWindowStackingClient(window_stacking_client_.get()); 16 aura::client::SetWindowStackingClient(window_stacking_client_.get());
17 aura::client::SetTransientWindowClient(transient_window_client_.get()); 17 aura::client::SetTransientWindowClient(transient_window_client_.get());
18 if (!ui::PlatformEventSource::GetInstance())
19 event_source_ = ui::PlatformEventSource::CreateDefault();
20 } 18 }
21 19
22 WMState::~WMState() { 20 WMState::~WMState() {
23 if (aura::client::GetWindowStackingClient() == window_stacking_client_.get()) 21 if (aura::client::GetWindowStackingClient() == window_stacking_client_.get())
24 aura::client::SetWindowStackingClient(NULL); 22 aura::client::SetWindowStackingClient(NULL);
25 23
26 if (aura::client::GetTransientWindowClient() == 24 if (aura::client::GetTransientWindowClient() ==
27 transient_window_client_.get()) { 25 transient_window_client_.get()) {
28 aura::client::SetTransientWindowClient(NULL); 26 aura::client::SetTransientWindowClient(NULL);
29 } 27 }
30 } 28 }
31 29
32 } // namespace wm 30 } // namespace wm
OLDNEW
« no previous file with comments | « ui/wm/core/wm_state.h ('k') | ui/wm/test/wm_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698