Flutter Engine
shell_test_platform_view.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_H_
6 #define FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_H_
7 
8 #include "flutter/shell/common/platform_view.h"
9 #include "flutter/shell/common/shell_test_external_view_embedder.h"
10 #include "flutter/shell/common/vsync_waiters_test.h"
11 
12 namespace flutter {
13 namespace testing {
14 
16  public:
17  enum class BackendType {
18  kGLBackend,
21  };
22 
23  static std::unique_ptr<ShellTestPlatformView> Create(
24  PlatformView::Delegate& delegate,
25  TaskRunners task_runners,
26  std::shared_ptr<ShellTestVsyncClock> vsync_clock,
27  CreateVsyncWaiter create_vsync_waiter,
28  BackendType backend,
29  std::shared_ptr<ShellTestExternalViewEmbedder>
30  shell_test_external_view_embedder);
31 
32  virtual void SimulateVSync() = 0;
33 
34  protected:
36  TaskRunners task_runners)
37  : PlatformView(delegate, task_runners) {}
38 
40 };
41 
42 } // namespace testing
43 } // namespace flutter
44 
45 #endif // FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_GL_H_
FML_DISALLOW_COPY_AND_ASSIGN(ShellTestPlatformView)
Platform views are created by the shell on the platform task runner. Unless explicitly specified...
Definition: platform_view.h:44
std::function< std::unique_ptr< VsyncWaiter >()> CreateVsyncWaiter
ShellTestPlatformView(PlatformView::Delegate &delegate, TaskRunners task_runners)
Used to forward events from the platform view to interested subsystems. This forwarding is done by th...
Definition: platform_view.h:51
static std::unique_ptr< ShellTestPlatformView > Create(PlatformView::Delegate &delegate, TaskRunners task_runners, std::shared_ptr< ShellTestVsyncClock > vsync_clock, CreateVsyncWaiter create_vsync_waiter, BackendType backend, std::shared_ptr< ShellTestExternalViewEmbedder > shell_test_external_view_embedder)