forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccessibility_delegate.h
58 lines (43 loc) · 1.88 KB
/
accessibility_delegate.h
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
// Copyright 2013 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 ASH_ACCESSIBILITY_ACCESSIBILITY_DELEGATE_H_
#define ASH_ACCESSIBILITY_ACCESSIBILITY_DELEGATE_H_
#include <vector>
#include "ash/ash_export.h"
#include "ui/accessibility/ax_tree_id.h"
#include "ui/accessibility/ax_tree_update.h"
namespace ui {
struct AXEvent;
}
namespace ash {
// A delegate class to control and query accessibility features.
//
// NOTE: Methods in this class are migrating to AccessibilityController to
// support mash (because ash is in a separate process and cannot call back into
// chrome). Add new methods there, not here.
class ASH_EXPORT AccessibilityDelegate {
public:
virtual ~AccessibilityDelegate() {}
// Invoked to enable the screen magnifier.
virtual void SetMagnifierEnabled(bool enabled) = 0;
// Returns true if the screen magnifier is enabled.
virtual bool IsMagnifierEnabled() const = 0;
// Returns true when the accessibility menu should be shown.
virtual bool ShouldShowAccessibilityMenu() const = 0;
// Saves the zoom scale of the full screen magnifier.
virtual void SaveScreenMagnifierScale(double scale) = 0;
// Gets a saved value of the zoom scale of full screen magnifier. If a value
// is not saved, return a negative value.
virtual double GetSavedScreenMagnifierScale() = 0;
// Automation API support for remote mojo apps.
// TODO(jamescook): Convert to mojo API.
virtual void DispatchAccessibilityEvent(
const ui::AXTreeID& tree_id,
const std::vector<ui::AXTreeUpdate>& updates,
const ui::AXEvent& event) = 0;
virtual void DispatchTreeDestroyedEvent(const ui::AXTreeID& tree_id) = 0;
// NOTE: Prefer adding methods to AccessibilityController, see class comment.
};
} // namespace ash
#endif // ASH_ACCESSIBILITY_ACCESSIBILITY_DELEGATE_H_