[Android] Implement 3-way sensor fallback for Device Orientation.
[chromium-blink-merge.git] / ui / wm / core / nested_accelerator_delegate.h
blob4b13c0d882b9b506637a488cf2ee96d37b87cb26
1 // Copyright 2014 The Chromium 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.
5 #ifndef UI_WM_CORE_NESTED_ACCELERATOR_DELEGATE_H_
6 #define UI_WM_CORE_NESTED_ACCELERATOR_DELEGATE_H_
8 namespace ui {
9 class Accelerator;
12 namespace wm {
14 // A delegate interface that implements the behavior of nested accelerator
15 // handling.
16 class NestedAcceleratorDelegate {
17 public:
18 enum Result {
19 RESULT_PROCESSED,
20 RESULT_NOT_PROCESSED,
21 // The key event should be ignored now and instead be reposted so that
22 // next event loop.
23 RESULT_PROCESS_LATER,
26 virtual ~NestedAcceleratorDelegate() {}
28 // Attempts to process the |accelerator|.
29 virtual Result ProcessAccelerator(const ui::Accelerator& accelerator) = 0;
32 } // namespace wm
34 #endif // UI_WM_CORE_NESTED_ACCELERATOR_DELEGATE_H_