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

Side by Side Diff: services/window_manager/window_manager_test_util.h

Issue 781603002: Port even more FocusController tests. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Initialize my member variables. Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_ 5 #ifndef SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_
6 #define SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_ 6 #define SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "mojo/services/public/cpp/view_manager/lib/view_private.h" 10 #include "mojo/services/public/cpp/view_manager/lib/view_private.h"
11 #include "mojo/services/public/cpp/view_manager/view.h" 11 #include "mojo/services/public/cpp/view_manager/view.h"
12 #include "services/window_manager/view_target.h" 12 #include "services/window_manager/view_target.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 class Rect; 15 class Rect;
16 } 16 }
17 17
18 namespace mojo { 18 namespace mojo {
19 19
20 // A wrapper around View so we can instantiate these directly without a 20 // A wrapper around View so we can instantiate these directly without a
21 // ViewManager. 21 // ViewManager.
22 class TestView : public View { 22 class TestView : public View {
23 public: 23 public:
24 TestView(int id, const gfx::Rect& rect); 24 TestView(int id, const gfx::Rect& rect);
25 TestView(int id, const gfx::Rect& rect, View* parent); 25 TestView(int id, const gfx::Rect& rect, View* parent);
26 ~TestView(); 26 ~TestView();
27 27
28 // Builds a child view as a pointer. The caller is responsible for making
29 // sure that the root of any tree allocated this way is Destroy()ed.
30 static TestView* Build(int id, const gfx::Rect& rect);
31 static TestView* Build(int id, const gfx::Rect& rect, View* parent);
32
28 ViewTarget* target() { return target_; } 33 ViewTarget* target() { return target_; }
29 34
30 private: 35 private:
31 ViewTarget* target_; 36 ViewTarget* target_;
32 37
33 DISALLOW_COPY_AND_ASSIGN(TestView); 38 DISALLOW_COPY_AND_ASSIGN(TestView);
34 }; 39 };
35 40
36 } // namespace mojo 41 } // namespace mojo
37 42
38 #endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_ 43 #endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « services/window_manager/focus_controller_unittest.cc ('k') | services/window_manager/window_manager_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698