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
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130

ash / public / cpp / test / mock_input_device_settings_controller.h [blame]

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_PUBLIC_CPP_TEST_MOCK_INPUT_DEVICE_SETTINGS_CONTROLLER_H_
#define ASH_PUBLIC_CPP_TEST_MOCK_INPUT_DEVICE_SETTINGS_CONTROLLER_H_

#include "ash/public/cpp/ash_public_export.h"
#include "ash/public/cpp/input_device_settings_controller.h"
#include "ash/public/mojom/input_device_settings.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace ash {

class ASH_PUBLIC_EXPORT MockInputDeviceSettingsController
    : public InputDeviceSettingsController {
 public:
  MockInputDeviceSettingsController();
  MockInputDeviceSettingsController(const MockInputDeviceSettingsController&) =
      delete;
  MockInputDeviceSettingsController& operator=(
      const MockInputDeviceSettingsController&) = delete;
  ~MockInputDeviceSettingsController() override;

  // InputDeviceSettingsController:
  MOCK_METHOD(std::vector<mojom::KeyboardPtr>,
              GetConnectedKeyboards,
              (),
              (override));
  MOCK_METHOD(std::vector<mojom::TouchpadPtr>,
              GetConnectedTouchpads,
              (),
              (override));
  MOCK_METHOD(std::vector<mojom::MousePtr>, GetConnectedMice, (), (override));
  MOCK_METHOD(std::vector<mojom::PointingStickPtr>,
              GetConnectedPointingSticks,
              (),
              (override));
  MOCK_METHOD(std::vector<mojom::GraphicsTabletPtr>,
              GetConnectedGraphicsTablets,
              (),
              (override));
  MOCK_METHOD(const mojom::KeyboardSettings*,
              GetKeyboardSettings,
              (DeviceId id),
              (override));
  MOCK_METHOD(const mojom::MouseSettings*,
              GetMouseSettings,
              (DeviceId id),
              (override));
  MOCK_METHOD(const mojom::TouchpadSettings*,
              GetTouchpadSettings,
              (DeviceId id),
              (override));
  MOCK_METHOD(const mojom::PointingStickSettings*,
              GetPointingStickSettings,
              (DeviceId id),
              (override));
  MOCK_METHOD(const mojom::GraphicsTabletSettings*,
              GetGraphicsTabletSettings,
              (DeviceId id),
              (override));
  MOCK_METHOD(const mojom::Keyboard*, GetKeyboard, (DeviceId id), (override));
  MOCK_METHOD(const mojom::Mouse*, GetMouse, (DeviceId id), (override));
  MOCK_METHOD(const mojom::Touchpad*, GetTouchpad, (DeviceId id), (override));
  MOCK_METHOD(const mojom::PointingStick*,
              GetPointingStick,
              (DeviceId id),
              (override));
  MOCK_METHOD(const mojom::GraphicsTablet*,
              GetGraphicsTablet,
              (DeviceId id),
              (override));
  MOCK_METHOD(const mojom::KeyboardPolicies&,
              GetKeyboardPolicies,
              (),
              (override));
  MOCK_METHOD(const mojom::MousePolicies&, GetMousePolicies, (), (override));
  MOCK_METHOD(bool,
              SetKeyboardSettings,
              (DeviceId id, mojom::KeyboardSettingsPtr settings),
              (override));
  MOCK_METHOD(void,
              RestoreDefaultKeyboardRemappings,
              (DeviceId id),
              (override));
  MOCK_METHOD(bool,
              SetTouchpadSettings,
              (DeviceId id, mojom::TouchpadSettingsPtr settings),
              (override));
  MOCK_METHOD(bool,
              SetMouseSettings,
              (DeviceId id, mojom::MouseSettingsPtr settings),
              (override));
  MOCK_METHOD(bool,
              SetPointingStickSettings,
              (DeviceId id, mojom::PointingStickSettingsPtr settings),
              (override));
  MOCK_METHOD(bool,
              SetGraphicsTabletSettings,
              (DeviceId id, mojom::GraphicsTabletSettingsPtr settings),
              (override));
  MOCK_METHOD(void,
              OnLoginScreenFocusedPodChanged,
              (const AccountId&),
              (override));
  MOCK_METHOD(void, StartObservingButtons, (DeviceId id), (override));
  MOCK_METHOD(void, StopObservingButtons, (), (override));
  MOCK_METHOD(void,
              OnMouseButtonPressed,
              (DeviceId device_id, const mojom::Button& button),
              (override));
  MOCK_METHOD(void,
              OnGraphicsTabletButtonPressed,
              (DeviceId device_id, const mojom::Button& button),
              (override));
  MOCK_METHOD(
      void,
      GetDeviceImageDataUrl,
      (const std::string& device_key,
       base::OnceCallback<void(const std::optional<std::string>&)> callback),
      (override));
  MOCK_METHOD(void, ResetNotificationDeviceTracking, (), (override));
  MOCK_METHOD(void, AddObserver, (Observer * observer), (override));
  MOCK_METHOD(void, RemoveObserver, (Observer * observer), (override));
};

}  // namespace ash

#endif  // ASH_PUBLIC_CPP_TEST_MOCK_INPUT_DEVICE_SETTINGS_CONTROLLER_H_