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

Side by Side Diff: ui/wm/test/wm_test_helper.cc

Issue 219743002: x11: Move X event handling out of the message-pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r261267 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/test/wm_test_helper.h ('k') | ui/wm/wm.gyp » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/test/wm_test_helper.h" 5 #include "ui/wm/test/wm_test_helper.h"
6 6
7 #include "ui/aura/client/default_activation_client.h" 7 #include "ui/aura/client/default_activation_client.h"
8 #include "ui/aura/client/default_capture_client.h" 8 #include "ui/aura/client/default_capture_client.h"
9 #include "ui/aura/env.h" 9 #include "ui/aura/env.h"
10 #include "ui/aura/test/test_focus_client.h" 10 #include "ui/aura/test/test_focus_client.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #include "ui/events/platform/platform_event_source.h"
12 #include "ui/wm/core/compound_event_filter.h" 13 #include "ui/wm/core/compound_event_filter.h"
13 #include "ui/wm/core/input_method_event_filter.h" 14 #include "ui/wm/core/input_method_event_filter.h"
14 15
15 namespace wm { 16 namespace wm {
16 17
17 WMTestHelper::WMTestHelper(const gfx::Size& default_window_size) { 18 WMTestHelper::WMTestHelper(const gfx::Size& default_window_size) {
18 aura::Env::CreateInstance(); 19 aura::Env::CreateInstance();
20 event_source_ = ui::PlatformEventSource::CreateDefault();
19 host_.reset(aura::WindowTreeHost::Create(gfx::Rect(default_window_size))); 21 host_.reset(aura::WindowTreeHost::Create(gfx::Rect(default_window_size)));
20 host_->InitHost(); 22 host_->InitHost();
21 aura::client::SetWindowTreeClient(host_->window(), this); 23 aura::client::SetWindowTreeClient(host_->window(), this);
22 24
23 focus_client_.reset(new aura::test::TestFocusClient); 25 focus_client_.reset(new aura::test::TestFocusClient);
24 aura::client::SetFocusClient(host_->window(), focus_client_.get()); 26 aura::client::SetFocusClient(host_->window(), focus_client_.get());
25 27
26 root_window_event_filter_ = new wm::CompoundEventFilter; 28 root_window_event_filter_ = new wm::CompoundEventFilter;
27 // Pass ownership of the filter to the root_window. 29 // Pass ownership of the filter to the root_window.
28 host_->window()->SetEventFilter(root_window_event_filter_); 30 host_->window()->SetEventFilter(root_window_event_filter_);
(...skipping 14 matching lines...) Expand all
43 root_window_event_filter_->RemoveHandler(input_method_filter_.get()); 45 root_window_event_filter_->RemoveHandler(input_method_filter_.get());
44 } 46 }
45 47
46 aura::Window* WMTestHelper::GetDefaultParent(aura::Window* context, 48 aura::Window* WMTestHelper::GetDefaultParent(aura::Window* context,
47 aura::Window* window, 49 aura::Window* window,
48 const gfx::Rect& bounds) { 50 const gfx::Rect& bounds) {
49 return host_->window(); 51 return host_->window();
50 } 52 }
51 53
52 } // namespace wm 54 } // namespace wm
OLDNEW
« no previous file with comments | « ui/wm/test/wm_test_helper.h ('k') | ui/wm/wm.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698