Index: ui/aura/test/mus/test_window_manager_client.h |
diff --git a/ui/aura/test/mus/test_window_manager_client.h b/ui/aura/test/mus/test_window_manager_client.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c75d72b9417ea5b6e1570830962645b52154b232 |
--- /dev/null |
+++ b/ui/aura/test/mus/test_window_manager_client.h |
@@ -0,0 +1,70 @@ |
+// Copyright 2017 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 UI_AURA_TEST_MUS_TEST_WINDOW_MANAGER_CLIENT_H_ |
+#define UI_AURA_TEST_MUS_TEST_WINDOW_MANAGER_CLIENT_H_ |
+ |
+#include <stdint.h> |
+ |
+#include <vector> |
+ |
+#include "base/macros.h" |
+#include "services/ui/public/interfaces/window_manager.mojom.h" |
+#include "ui/aura/mus/mus_types.h" |
+ |
+namespace aura { |
+ |
+enum class WindowManagerClientChangeType { |
+ ADD_ACTIVATION_PARENT, |
+}; |
+ |
+// WindowManagerClient implementation for tests. |
+class TestWindowManagerClient : public ui::mojom::WindowManagerClient { |
+ public: |
+ TestWindowManagerClient(); |
+ ~TestWindowManagerClient() override; |
+ |
+ size_t GetChangeCountForType(WindowManagerClientChangeType type); |
+ |
+ private: |
+ struct Change { |
msw
2017/04/26 23:01:08
nit: remove struct if it won't be expanded imminen
sky
2017/04/26 23:30:28
Done.
|
+ WindowManagerClientChangeType type; |
+ }; |
+ |
+ // ui::mojom::WindowManagerClient: |
+ void AddAccelerators(std::vector<ui::mojom::WmAcceleratorPtr> accelerators, |
msw
2017/04/26 23:01:09
nit: match order with interface in window_manager.
sky
2017/04/26 23:30:28
Done.
|
+ const AddAcceleratorsCallback& callback) override; |
+ void RemoveAccelerator(uint32_t id) override; |
+ void AddActivationParent(Id transport_window_id) override; |
+ void RemoveActivationParent(Id transport_window_id) override; |
+ void ActivateNextWindow() override; |
+ void SetExtendedHitArea(Id window_id, const gfx::Insets& hit_area) override; |
+ void SetDisplayRoot(const display::Display& display, |
+ ui::mojom::WmViewportMetricsPtr viewport_metrics, |
+ bool is_primary_display, |
+ Id window_id, |
+ const SetDisplayRootCallback& callback) override; |
+ void WmResponse(uint32_t change_id, bool response) override; |
+ void WmSetBoundsResponse(uint32_t change_id) override; |
+ void WmRequestClose(Id transport_window_id) override; |
+ void WmSetFrameDecorationValues( |
+ ui::mojom::FrameDecorationValuesPtr values) override; |
+ void WmSetNonClientCursor(uint32_t window_id, |
+ ui::mojom::CursorType cursor_id) override; |
+ void OnWmCreatedTopLevelWindow(uint32_t change_id, |
+ Id transport_window_id) override; |
+ void OnAcceleratorAck( |
+ uint32_t event_id, |
+ ui::mojom::EventResult result, |
+ const std::unordered_map<std::string, std::vector<uint8_t>>& properties) |
+ override; |
+ |
+ std::vector<Change> changes_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TestWindowManagerClient); |
+}; |
+ |
+} // namespace aura |
+ |
+#endif // UI_AURA_TEST_MUS_TEST_WINDOW_MANAGER_CLIENT_H_ |