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

Unified Diff: ui/views/touchui/gesture_manager.cc

Issue 8598024: Now that we are doing a hard-cut-over to Aura, remove a bunch of *Views based classes that are ob... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/test/test_views_delegate.cc ('k') | views/controls/combobox/native_combobox_wayland.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/touchui/gesture_manager.cc
===================================================================
--- ui/views/touchui/gesture_manager.cc (revision 110826)
+++ ui/views/touchui/gesture_manager.cc (working copy)
@@ -11,7 +11,6 @@
#include "base/logging.h"
#include "ui/views/events/event.h"
#include "views/view.h"
-#include "views/views_delegate.h"
#include "views/widget/widget.h"
namespace views {
@@ -38,28 +37,17 @@
// location information from the native-event, so it needs to convert the
// coordinate to the target widget.
MouseEvent mouseev(event);
- if (ViewsDelegate::views_delegate->GetDefaultParentView()) {
- // TODO(oshima): We may need to send the event back through
- // window manager to handle mouse capture correctly.
- Widget* desktop =
- ViewsDelegate::views_delegate->GetDefaultParentView()->GetWidget();
- Widget* source_widget = source->GetWidget();
- MouseEvent converted(
- mouseev, desktop->GetRootView(), source_widget->GetRootView());
- source_widget->OnMouseEvent(converted);
+ Widget* source_widget = source->GetWidget();
+ Widget* top_widget = source_widget->GetTopLevelWidget();
+ if (source_widget != top_widget && top_widget) {
+ // This is necessary as TYPE_CHILD widget is still NativeWidgetGtk.
+ // Fix this once TYPE_CHILD is switched to NativeWidgetViews.
+ MouseEvent converted(mouseev,
+ top_widget->GetRootView(),
+ source_widget->GetRootView());
+ source_widget->OnMouseEvent(mouseev);
} else {
- Widget* source_widget = source->GetWidget();
- Widget* top_widget = source_widget->GetTopLevelWidget();
- if (source_widget != top_widget && top_widget) {
- // This is necessary as TYPE_CHILD widget is still NativeWidgetGtk.
- // Fix this once TYPE_CHILD is switched to NativeWidgetViews.
- MouseEvent converted(mouseev,
- top_widget->GetRootView(),
- source_widget->GetRootView());
- source_widget->OnMouseEvent(mouseev);
- } else {
- source_widget->OnMouseEvent(mouseev);
- }
+ source_widget->OnMouseEvent(mouseev);
}
return true;
}
« no previous file with comments | « ui/views/test/test_views_delegate.cc ('k') | views/controls/combobox/native_combobox_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698