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

Side by Side Diff: ui/wm/android/window_tree_host_manager.h

Issue 1403293003: Introduce AndroidFocusRules and NativeWidgetAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/wm/android/android_focus_rules.cc ('k') | ui/wm/android/window_tree_host_manager.cc » ('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 #ifndef UI_WM_TEST_WM_TEST_HELPER_H_ 5 #ifndef UI_WM_TEST_WM_HELPER_H_
6 #define UI_WM_TEST_WM_TEST_HELPER_H_ 6 #define UI_WM_TEST_WM_HELPER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/client/window_tree_client.h" 11 #include "ui/aura/client/window_tree_client.h"
11 #include "ui/aura/window_tree_host.h" 12 #include "ui/aura/window_tree_host.h"
12 13
13 namespace aura { 14 namespace aura {
14 class Window; 15 class Window;
15 class WindowTreeHost; 16 class WindowTreeHost;
16 namespace client { 17 namespace client {
17 class DefaultCaptureClient; 18 class DefaultCaptureClient;
18 class FocusClient; 19 class FocusClient;
19 } 20 }
20 } 21 }
21 22
22 namespace gfx { 23 namespace gfx {
23 class Rect; 24 class Rect;
24 class Size; 25 class Size;
25 } 26 }
26 27
27 namespace ui { 28 namespace ui {
28 class ContextFactory; 29 class ContextFactory;
29 } 30 }
30 31
31 namespace wm { 32 namespace wm {
32 33
33 class CompoundEventFilter; 34 class CompoundEventFilter;
34 35
35 // Creates a minimal environment for running the shell. We can't pull in all of 36 // Creates a minimal environment for running the shell. We can't pull in all of
36 // ash here, but we can create attach several of the same things we'd find in 37 // ash here, but we can create attach several of the same things we'd find in
37 // the ash parts of the code. 38 // the ash parts of the code.
38 class WMTestHelper : public aura::client::WindowTreeClient { 39 class WindowTreeHostManager : public aura::client::WindowTreeClient {
mfomitchev 2015/10/21 21:32:00 Perhaps we should create a common base class for W
39 public: 40 public:
40 WMTestHelper(const gfx::Size& default_window_size, 41 WindowTreeHostManager(const gfx::Size& default_window_size,
41 ui::ContextFactory* context_factory); 42 ui::ContextFactory* context_factory);
42 ~WMTestHelper() override; 43 ~WindowTreeHostManager() override;
43 44
44 aura::WindowTreeHost* host() { return host_.get(); } 45 aura::WindowTreeHost* host() { return host_.get(); }
45 46
46 // Overridden from client::WindowTreeClient: 47 // Overridden from client::WindowTreeClient:
47 aura::Window* GetDefaultParent(aura::Window* context, 48 aura::Window* GetDefaultParent(aura::Window* context,
48 aura::Window* window, 49 aura::Window* window,
49 const gfx::Rect& bounds) override; 50 const gfx::Rect& bounds) override;
50 51
51 private: 52 private:
52 scoped_ptr<aura::WindowTreeHost> host_; 53 scoped_ptr<aura::WindowTreeHost> host_;
53 54
54 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_; 55 scoped_ptr<wm::CompoundEventFilter> root_window_event_filter_;
55 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_; 56 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
56 scoped_ptr<aura::client::FocusClient> focus_client_; 57 scoped_ptr<aura::client::FocusClient> focus_client_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(WMTestHelper); 59 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostManager);
59 }; 60 };
60 61
61 } // namespace wm 62 } // namespace wm
62 63
63 #endif // UI_WM_TEST_WM_TEST_HELPER_H_ 64 #endif // UI_WM_TEST_WM_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ui/wm/android/android_focus_rules.cc ('k') | ui/wm/android/window_tree_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698