| // Copyright 2019 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_VIZ_PRIVILEGED_INTERFACES_COMPOSITING_LAYERED_WINDOW_UPDATER_MOJOM_TEST_UTILS_H_ |
| #define SERVICES_VIZ_PRIVILEGED_INTERFACES_COMPOSITING_LAYERED_WINDOW_UPDATER_MOJOM_TEST_UTILS_H_ |
| |
| #include "services/viz/privileged/interfaces/compositing/layered_window_updater.mojom.h" |
| |
| |
| namespace viz { |
| namespace mojom { |
| |
| |
| class LayeredWindowUpdaterInterceptorForTesting : public LayeredWindowUpdater { |
| virtual LayeredWindowUpdater* GetForwardingInterface() = 0; |
| void OnAllocatedSharedMemory(const gfx::Size& pixel_size, base::UnsafeSharedMemoryRegion region) override; |
| void Draw(DrawCallback callback) override; |
| }; |
| class LayeredWindowUpdaterAsyncWaiter { |
| public: |
| explicit LayeredWindowUpdaterAsyncWaiter(LayeredWindowUpdater* proxy); |
| ~LayeredWindowUpdaterAsyncWaiter(); |
| void Draw( |
| ); |
| |
| private: |
| LayeredWindowUpdater* const proxy_; |
| |
| DISALLOW_COPY_AND_ASSIGN(LayeredWindowUpdaterAsyncWaiter); |
| }; |
| |
| |
| |
| |
| } // namespace mojom |
| } // namespace viz |
| |
| #endif // SERVICES_VIZ_PRIVILEGED_INTERFACES_COMPOSITING_LAYERED_WINDOW_UPDATER_MOJOM_TEST_UTILS_H_ |