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

Side by Side Diff: ui/views/mus/test_utils.h

Issue 2611773002: Removes code using mus client lib (Closed)
Patch Set: dont run on linux Created 3 years, 11 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/views/mus/surface_context_factory.cc ('k') | ui/views/mus/text_input_client_impl.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_VIEWS_MUS_TEST_UTILS_H_ 5 #ifndef UI_VIEWS_MUS_TEST_UTILS_H_
6 #define UI_VIEWS_MUS_TEST_UTILS_H_ 6 #define UI_VIEWS_MUS_TEST_UTILS_H_
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "ui/views/mus/mus_client.h" 9 #include "ui/views/mus/mus_client.h"
10 #include "ui/views/mus/window_manager_connection.h"
11 10
12 namespace views { 11 namespace views {
13 namespace test { 12 namespace test {
14 13
15 class WindowManagerConnectionTestApi {
16 public:
17 explicit WindowManagerConnectionTestApi(WindowManagerConnection* connection)
18 : connection_(connection) {}
19 ~WindowManagerConnectionTestApi() {}
20
21 ui::Window* GetUiWindowAtScreenPoint(const gfx::Point& point) {
22 return connection_->GetUiWindowAtScreenPoint(point);
23 }
24
25 ScreenMus* screen() { return connection_->screen_.get(); }
26
27 private:
28 WindowManagerConnection* connection_;
29
30 DISALLOW_COPY_AND_ASSIGN(WindowManagerConnectionTestApi);
31 };
32
33 class MusClientTestApi { 14 class MusClientTestApi {
34 public: 15 public:
35 static std::unique_ptr<MusClient> Create( 16 static std::unique_ptr<MusClient> Create(
36 service_manager::Connector* connector, 17 service_manager::Connector* connector,
37 const service_manager::Identity& identity) { 18 const service_manager::Identity& identity) {
38 return base::WrapUnique(new MusClient(connector, identity)); 19 return base::WrapUnique(new MusClient(connector, identity));
39 } 20 }
40 21
41 private: 22 private:
42 DISALLOW_IMPLICIT_CONSTRUCTORS(MusClientTestApi); 23 DISALLOW_IMPLICIT_CONSTRUCTORS(MusClientTestApi);
43 }; 24 };
44 25
45 } // namespace test 26 } // namespace test
46 } // namespace views 27 } // namespace views
47 28
48 #endif // UI_VIEWS_MUS_TEST_UTILS_H_ 29 #endif // UI_VIEWS_MUS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « ui/views/mus/surface_context_factory.cc ('k') | ui/views/mus/text_input_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698