summaryrefslogtreecommitdiffstats
path: root/ui/touch_selection/touch_selection_controller_test_api.h
blob: 66ce6db027d0395689e7eb9bed9920045d4646f0 (plain)
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
// Copyright 2015 The Chromium 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 UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_TEST_API_H_
#define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_TEST_API_H_

#include "base/macros.h"
#include "ui/touch_selection/touch_selection_controller.h"

namespace ui {

// Test api class to access internals of |ui::TouchSelectionController| in
// tests.
class TouchSelectionControllerTestApi {
 public:
  explicit TouchSelectionControllerTestApi(
      TouchSelectionController* controller);
  ~TouchSelectionControllerTestApi();

  bool GetStartVisible() const;
  bool GetEndVisible() const;
  TouchHandleOrientation GetStartHandleOrientation() const;
  TouchHandleOrientation GetEndHandleOrientation() const;

  bool temporarily_hidden() const { return controller_->temporarily_hidden_; }

 private:
  TouchSelectionController* const controller_;

  DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerTestApi);
};

}  // namespace ui

#endif  // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_TEST_API_H_