Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
mock_window_binding_handler.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_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/shell/platform/windows/window_binding_handler.h"
10#include "flutter/third_party/accessibility/ax/platform/ax_platform_node_win.h"
11#include "gmock/gmock.h"
12
13namespace flutter {
14namespace testing {
15
16/// Mock for the |Window| base class.
18 public:
21
22 MOCK_METHOD(void, SetView, (WindowBindingHandlerDelegate * view), (override));
23 MOCK_METHOD(HWND, GetWindowHandle, (), (override));
24 MOCK_METHOD(float, GetDpiScale, (), (override));
28 (const std::string& cursor_name),
29 (override));
30 MOCK_METHOD(void, SetFlutterCursor, (HCURSOR cursor_name), (override));
31 MOCK_METHOD(void, OnCursorRectUpdated, (const Rect& rect), (override));
32 MOCK_METHOD(void, OnResetImeComposing, (), (override));
33 MOCK_METHOD(bool, OnBitmapSurfaceCleared, (), (override));
36 (const void* allocation, size_t row_bytes, size_t height),
37 (override));
40 MOCK_METHOD(ui::AXPlatformNodeWin*, GetAlert, (), (override));
41
42 private:
44};
45
46} // namespace testing
47} // namespace flutter
48
49#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_
virtual void SetFlutterCursor(HCURSOR cursor)=0
virtual void OnResetImeComposing()=0
virtual PointerLocation GetPrimaryPointerLocation()=0
virtual HWND GetWindowHandle()=0
virtual bool OnBitmapSurfaceUpdated(const void *allocation, size_t row_bytes, size_t height)=0
virtual ui::AXPlatformNodeWin * GetAlert()=0
virtual void UpdateFlutterCursor(const std::string &cursor_name)=0
virtual bool OnBitmapSurfaceCleared()=0
virtual PhysicalWindowBounds GetPhysicalWindowBounds()=0
virtual float GetDpiScale()=0
virtual void SetView(WindowBindingHandlerDelegate *view)=0
virtual AlertPlatformNodeDelegate * GetAlertDelegate()=0
virtual void OnCursorRectUpdated(const Rect &rect)=0
MOCK_METHOD(AlertPlatformNodeDelegate *, GetAlertDelegate,(),(override))
MOCK_METHOD(bool, OnBitmapSurfaceCleared,(),(override))
MOCK_METHOD(HWND, GetWindowHandle,(),(override))
MOCK_METHOD(float, GetDpiScale,(),(override))
MOCK_METHOD(void, SetFlutterCursor,(HCURSOR cursor_name),(override))
MOCK_METHOD(bool, OnBitmapSurfaceUpdated,(const void *allocation, size_t row_bytes, size_t height),(override))
MOCK_METHOD(void, UpdateFlutterCursor,(const std::string &cursor_name),(override))
MOCK_METHOD(ui::AXPlatformNodeWin *, GetAlert,(),(override))
MOCK_METHOD(PhysicalWindowBounds, GetPhysicalWindowBounds,(),(override))
MOCK_METHOD(PointerLocation, GetPrimaryPointerLocation,(),(override))
MOCK_METHOD(void, OnCursorRectUpdated,(const Rect &rect),(override))
MOCK_METHOD(void, OnResetImeComposing,(),(override))
MOCK_METHOD(void, SetView,(WindowBindingHandlerDelegate *view),(override))
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
int32_t height