Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: ui/views/test/widget_event_generator_aura.cc

Issue 322893005: MacViews: Add WidgetEventGenerator to abstract platform-specific event generation for tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cull orthogonal stuff, add WidgetTest.MouseEventTypesViaGenerator Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "ui/views/test/widget_event_generator.h"
6
7 #include "ui/aura/window.h"
8 #include "ui/views/widget.h"
9
10 namespace views {
11 namespace test {
12
13 WidgetEventGenerator::WidgetEventGenerator(Widget* widget)
14 : aura::test::EventGenerator(widget->GetNativeView()->GetRootWindow()) {
15 }
16
17 WidgetEventGenerator::WidgetEventGenerator(gfx::NativeView context)
18 : aura::test::EventGenerator(context) {
19 }
20
21 WidgetEventGenerator::WidgetEventGenerator(
22 gfx::NativeView context,
23 Widget* window_for_initial_location)
24 : aura::test::EventGenerator(context, window_for_initial_location) {
25 }
26
27 WidgetEventGenerator::~WidgetEventGenerator() {
28 }
29
30 // static
31 WidgetEventGenerator::SimulateNativeDestroy(Widget* widget) {
32 delete widget->GetNativeView();
33 }
34
35 } // namespace views
36 } // namespace test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698