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

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

Issue 1155013005: Refactoring the ownership of ui::InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed bot failure: cast_shell_linux Created 5 years, 6 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
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 #ifndef UI_WM_TEST_WM_TEST_HELPER_H_ 5 #ifndef UI_WM_TEST_WM_TEST_HELPER_H_
6 #define UI_WM_TEST_WM_TEST_HELPER_H_ 6 #define UI_WM_TEST_WM_TEST_HELPER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/client/window_tree_client.h" 10 #include "ui/aura/client/window_tree_client.h"
(...skipping 13 matching lines...) Expand all
24 class Size; 24 class Size;
25 } 25 }
26 26
27 namespace ui { 27 namespace ui {
28 class ContextFactory; 28 class ContextFactory;
29 } 29 }
30 30
31 namespace wm { 31 namespace wm {
32 32
33 class CompoundEventFilter; 33 class CompoundEventFilter;
34 class InputMethodEventFilter;
35 34
36 // Creates a minimal environment for running the shell. We can't pull in all of 35 // Creates a minimal environment for running the shell. We can't pull in all of
37 // ash here, but we can create attach several of the same things we'd find in 36 // ash here, but we can create attach several of the same things we'd find in
38 // the ash parts of the code. 37 // the ash parts of the code.
39 class WMTestHelper : public aura::client::WindowTreeClient { 38 class WMTestHelper : public aura::client::WindowTreeClient {
40 public: 39 public:
41 WMTestHelper(const gfx::Size& default_window_size, 40 WMTestHelper(const gfx::Size& default_window_size,
42 ui::ContextFactory* context_factory); 41 ui::ContextFactory* context_factory);
43 ~WMTestHelper() override; 42 ~WMTestHelper() override;
44 43
45 aura::WindowTreeHost* host() { return host_.get(); } 44 aura::WindowTreeHost* host() { return host_.get(); }
46 45
47 // Overridden from client::WindowTreeClient: 46 // Overridden from client::WindowTreeClient:
48 aura::Window* GetDefaultParent(aura::Window* context, 47 aura::Window* GetDefaultParent(aura::Window* context,
49 aura::Window* window, 48 aura::Window* window,
50 const gfx::Rect& bounds) override; 49 const gfx::Rect& bounds) override;
51 50
52 private: 51 private:
53 scoped_ptr<aura::WindowTreeHost> host_; 52 scoped_ptr<aura::WindowTreeHost> host_;
54 53
55 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_; 54 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_;
56 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_; 55 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
57 scoped_ptr<wm::InputMethodEventFilter> input_method_filter_;
58 scoped_ptr<aura::client::FocusClient> focus_client_; 56 scoped_ptr<aura::client::FocusClient> focus_client_;
59 57
60 DISALLOW_COPY_AND_ASSIGN(WMTestHelper); 58 DISALLOW_COPY_AND_ASSIGN(WMTestHelper);
61 }; 59 };
62 60
63 } // namespace wm 61 } // namespace wm
64 62
65 #endif // UI_WM_TEST_WM_TEST_HELPER_H_ 63 #endif // UI_WM_TEST_WM_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698