DevTools: kill codeschool extension from whitelist
[chromium-blink-merge.git] / components / window_manager / window_manager_test_util.h
blob579cc4fa4f4193f1842609207f5b191aa24d54b2
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_
6 #define COMPONENTS_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_
8 #include <set>
10 #include "components/view_manager/public/cpp/lib/view_private.h"
11 #include "components/view_manager/public/cpp/view.h"
12 #include "components/window_manager/view_target.h"
14 namespace gfx {
15 class Rect;
18 namespace window_manager {
20 // A wrapper around View so we can instantiate these directly without a
21 // ViewManager.
22 class TestView : public mojo::View {
23 public:
24 TestView(int id, const gfx::Rect& rect);
25 TestView(int id, const gfx::Rect& rect, mojo::View* parent);
26 ~TestView();
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);
33 ViewTarget* target() { return target_; }
35 private:
36 ViewTarget* target_;
38 DISALLOW_COPY_AND_ASSIGN(TestView);
41 } // namespace window_manager
43 #endif // COMPONENTS_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_