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

Unified Diff: ui/aura/test/aura_test_helper.h

Issue 2445163002: Make aura work with mus (Closed)
Patch Set: NON_EXPORTED_BASE_CLASS Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/aura_test_helper.h
diff --git a/ui/aura/test/aura_test_helper.h b/ui/aura/test/aura_test_helper.h
index 65332f6bd86fc9c6e096f1faf9a963a6c4ad8ade..9a117a886f52561ac3cacb6e65184b591a852041 100644
--- a/ui/aura/test/aura_test_helper.h
+++ b/ui/aura/test/aura_test_helper.h
@@ -8,13 +8,10 @@
#include <memory>
#include "base/macros.h"
+#include "ui/aura/env.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tree_host.h"
-namespace aura {
-class Env;
-}
-
namespace base {
class MessageLoopForUI;
}
@@ -27,7 +24,16 @@ class ScopedAnimationDurationScaleMode;
namespace aura {
class TestScreen;
+class TestWindowTree;
+class TestWindowTreeClientSetup;
+class Window;
+class WindowPort;
+class WindowManagerDelegate;
+class WindowTreeClient;
+class WindowTreeClientDelegate;
+
namespace client {
+class CaptureClient;
class DefaultCaptureClient;
class FocusClient;
}
@@ -42,6 +48,9 @@ class AuraTestHelper {
explicit AuraTestHelper(base::MessageLoopForUI* message_loop);
~AuraTestHelper();
+ void EnableMus(WindowTreeClientDelegate* window_tree_delegate,
+ WindowManagerDelegate* window_manager_delegate);
+
// Creates and initializes (shows and sizes) the RootWindow for use in tests.
void SetUp(ui::ContextFactory* context_factory);
@@ -58,10 +67,22 @@ class AuraTestHelper {
TestScreen* test_screen() { return test_screen_.get(); }
+ TestWindowTree* window_tree();
+ WindowTreeClient* window_tree_client();
+
+ client::FocusClient* focus_client() { return focus_client_.get(); }
+ client::CaptureClient* capture_client();
+
private:
+ Env::WindowPortFactory InitMus();
+
+ std::unique_ptr<WindowPort> CreateWindowPortMus(Window* window);
+
base::MessageLoopForUI* message_loop_;
+ bool use_mus_ = false;
bool setup_called_;
bool teardown_called_;
+ std::unique_ptr<TestWindowTreeClientSetup> window_tree_client_setup_;
std::unique_ptr<aura::Env> env_;
std::unique_ptr<WindowTreeHost> host_;
std::unique_ptr<TestWindowParentingClient> parenting_client_;
@@ -69,6 +90,8 @@ class AuraTestHelper {
std::unique_ptr<client::FocusClient> focus_client_;
std::unique_ptr<TestScreen> test_screen_;
std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
+ WindowTreeClientDelegate* window_tree_delegate_ = nullptr;
+ WindowManagerDelegate* window_manager_delegate_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(AuraTestHelper);
};
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698