summaryrefslogtreecommitdiffstats
path: root/ash/test/test_overlay_delegate.h
blob: 16abad12163248aafc8a33aaea83ca9b88184636 (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
// Copyright 2014 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_TEST_TEST_OVERLAY_DELEGATE_H_
#define ASH_TEST_TEST_OVERLAY_DELEGATE_H_

#include "ash/wm/overlay_event_filter.h"

namespace ash {
namespace test {

class TestOverlayDelegate : public OverlayEventFilter::Delegate {
 public:
  TestOverlayDelegate();
  virtual ~TestOverlayDelegate();

  int GetCancelCountAndReset();

 private:
  // Overridden from OverlayEventFilter::Delegate:
  void Cancel() override;
  bool IsCancelingKeyEvent(ui::KeyEvent* event) override;
  aura::Window* GetWindow() override;

  int cancel_count_;

  DISALLOW_COPY_AND_ASSIGN(TestOverlayDelegate);
};

}  // namespace test
}  // namespace ash

#endif  // ASH_TEST_TEST_OVERLAY_DELEGATE_H_