summaryrefslogtreecommitdiffstats
path: root/ui/views/widget/root_view_test_helper.h
blob: a26396730b2bfe0772d6a3d54a1c41ec0a3df5a1 (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
// 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 UI_VIEWS_WIDGET_ROOT_VIEW_TEST_HELPER_H_
#define UI_VIEWS_WIDGET_ROOT_VIEW_TEST_HELPER_H_

#include "ui/views/widget/root_view.h"

namespace views {
namespace test {

class RootViewTestHelper {
 public:
  explicit RootViewTestHelper(internal::RootView* root_view)
      : root_view_(root_view) {
  }
  ~RootViewTestHelper() {}

  void DispatchKeyEventStartAt(View* view, ui::KeyEvent* event) {
    root_view_->DispatchKeyEventStartAt(view, event);
  }

 private:
  internal::RootView* root_view_;

  DISALLOW_COPY_AND_ASSIGN(RootViewTestHelper);
};

}  // namespace test
}  // namespace views

#endif  // UI_VIEWS_WIDGET_ROOT_VIEW_TEST_HELPER_H_