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

Unified Diff: mojo/services/window_manager/window_manager_test_util.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/window_manager/window_manager_test_util.h
diff --git a/mojo/services/window_manager/window_manager_test_util.h b/mojo/services/window_manager/window_manager_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..62424c78d92b4be91dec99876083931bb7190eb8
--- /dev/null
+++ b/mojo/services/window_manager/window_manager_test_util.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_
+#define SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_
+
+#include <set>
+
+#include "mojo/services/window_manager/view_target.h"
+#include "third_party/mojo_services/src/view_manager/public/cpp/lib/view_private.h"
+#include "third_party/mojo_services/src/view_manager/public/cpp/view.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace window_manager {
+
+// A wrapper around View so we can instantiate these directly without a
+// ViewManager.
+class TestView : public mojo::View {
+ public:
+ TestView(int id, const gfx::Rect& rect);
+ TestView(int id, const gfx::Rect& rect, mojo::View* parent);
+ ~TestView();
+
+ // Builds a child view as a pointer. The caller is responsible for making
+ // sure that the root of any tree allocated this way is Destroy()ed.
+ static TestView* Build(int id, const gfx::Rect& rect);
+ static TestView* Build(int id, const gfx::Rect& rect, View* parent);
+
+ ViewTarget* target() { return target_; }
+
+ private:
+ ViewTarget* target_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestView);
+};
+
+} // namespace window_manager
+
+#endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_TEST_UTIL_H_
« no previous file with comments | « mojo/services/window_manager/window_manager_impl.cc ('k') | mojo/services/window_manager/window_manager_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698