1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
content / browser / renderer_host / input / mock_render_widget_host_view_for_stylus_writing.h [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_RENDER_WIDGET_HOST_VIEW_FOR_STYLUS_WRITING_H_
#define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_RENDER_WIDGET_HOST_VIEW_FOR_STYLUS_WRITING_H_
#include "content/test/test_render_view_host.h"
namespace content {
class RenderWidgetHost;
class MockRenderWidgetHostViewForStylusWriting
: public TestRenderWidgetHostView {
public:
explicit MockRenderWidgetHostViewForStylusWriting(RenderWidgetHost* host)
: TestRenderWidgetHostView(host) {}
~MockRenderWidgetHostViewForStylusWriting() override = default;
bool ShouldInitiateStylusWriting() override;
void NotifyHoverActionStylusWritable(bool stylus_writable) override;
void set_supports_stylus_writing(bool supports) {
supports_stylus_writing_ = supports;
}
bool hover_action_stylus_writable() { return hover_action_stylus_writable_; }
private:
bool supports_stylus_writing_ = false;
bool hover_action_stylus_writable_ = false;
};
} // namespace content
#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_RENDER_WIDGET_HOST_VIEW_FOR_STYLUS_WRITING_H_