| // Copyright 2013 The Flutter 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 FLOW_TESTING_MOCK_EMBEDDER_H_ |
| #define FLOW_TESTING_MOCK_EMBEDDER_H_ |
| |
| #include "flutter/flow/embedded_views.h" |
| |
| namespace flutter { |
| namespace testing { |
| |
| class MockViewEmbedder : public ExternalViewEmbedder { |
| public: |
| MockViewEmbedder(); |
| |
| ~MockViewEmbedder(); |
| |
| // |ExternalViewEmbedder| |
| SkCanvas* GetRootCanvas() override; |
| |
| // |ExternalViewEmbedder| |
| void CancelFrame() override; |
| |
| // |ExternalViewEmbedder| |
| void BeginFrame( |
| SkISize frame_size, |
| GrDirectContext* context, |
| double device_pixel_ratio, |
| fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger) override; |
| |
| // |ExternalViewEmbedder| |
| void PrerollCompositeEmbeddedView( |
| int view_id, |
| std::unique_ptr<EmbeddedViewParams> params) override; |
| |
| // |ExternalViewEmbedder| |
| std::vector<SkCanvas*> GetCurrentCanvases() override; |
| |
| // |ExternalViewEmbedder| |
| std::vector<DisplayListBuilder*> GetCurrentBuilders() override; |
| |
| // |ExternalViewEmbedder| |
| EmbedderPaintContext CompositeEmbeddedView(int view_id) override; |
| }; |
| |
| } // namespace testing |
| } // namespace flutter |
| |
| #endif // FLOW_TESTING_MOCK_EMBEDDER_H_ |