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

Unified Diff: ui/views/widget/widget_unittest.cc

Issue 191153004: Provide access to the WindowEventDispatcher as a ui::EventProcessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/wm/test/wm_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_unittest.cc
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 4d33b2b54cd94eb4949127376ab81d0769c0333d..d9b6b42d6787c55103657446fee7838abbd577ca 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -17,8 +17,9 @@
#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
-#include "ui/aura/window_event_dispatcher.h"
+#include "ui/aura/window_tree_host.h"
#include "ui/base/hit_test.h"
+#include "ui/events/event_processor.h"
#include "ui/events/event_utils.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
@@ -1289,8 +1290,8 @@ void GenerateMouseEvents(Widget* widget, ui::EventType last_event_type) {
const gfx::Rect screen_bounds(widget->GetWindowBoundsInScreen());
ui::MouseEvent move_event(ui::ET_MOUSE_MOVED, screen_bounds.CenterPoint(),
screen_bounds.CenterPoint(), 0, 0);
- aura::WindowEventDispatcher* dispatcher =
- widget->GetNativeWindow()->GetHost()->dispatcher();
+ ui::EventProcessor* dispatcher =
+ widget->GetNativeWindow()->GetHost()->event_processor();
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move_event);
if (last_event_type == ui::ET_MOUSE_ENTERED || details.dispatcher_destroyed)
return;
@@ -2058,7 +2059,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
ui::EF_NONE,
ui::EF_NONE);
ui::EventDispatchDetails details = top_level_widget.GetNativeView()->
- GetHost()->dispatcher()->OnEventFromSource(&move_main);
+ GetHost()->event_processor()->OnEventFromSource(&move_main);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(1, widget_view->GetEventCount(ui::ET_MOUSE_ENTERED));
@@ -2085,7 +2086,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
cursor_location_dialog,
ui::EF_NONE,
ui::EF_NONE);
- details = top_level_widget.GetNativeView()->GetHost()->dispatcher()->
+ details = top_level_widget.GetNativeView()->GetHost()->event_processor()->
OnEventFromSource(&mouse_down_dialog);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(1, dialog_widget_view->GetEventCount(ui::ET_MOUSE_PRESSED));
@@ -2098,7 +2099,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
cursor_location_main2,
ui::EF_NONE,
ui::EF_NONE);
- details = top_level_widget.GetNativeView()->GetHost()->dispatcher()->
+ details = top_level_widget.GetNativeView()->GetHost()->event_processor()->
OnEventFromSource(&mouse_down_main);
ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(0, widget_view->GetEventCount(ui::ET_MOUSE_MOVED));
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/wm/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698