diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-12 19:28:36 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-12 19:28:36 +0000 |
commit | e8e1ecb0078017b6228651f8132ca1edffd97edb (patch) | |
tree | aae26b004f8a88d4de2a1f356bd73919dae487d5 /ui/app_list | |
parent | 45b53fb40b913e5ba11f5465dd8dcd9b9a3b2388 (diff) | |
download | chromium_src-e8e1ecb0078017b6228651f8132ca1edffd97edb.zip chromium_src-e8e1ecb0078017b6228651f8132ca1edffd97edb.tar.gz chromium_src-e8e1ecb0078017b6228651f8132ca1edffd97edb.tar.bz2 |
app_list: UpdateDragFromItem should have a valid drag_view_.
BUG=326368
Review URL: https://codereview.chromium.org/108873007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/app_list')
-rw-r--r-- | ui/app_list/views/app_list_item_view.cc | 5 | ||||
-rw-r--r-- | ui/app_list/views/apps_grid_view.cc | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc index 7896877..f2e9c64 100644 --- a/ui/app_list/views/app_list_item_view.cc +++ b/ui/app_list/views/app_list_item_view.cc @@ -407,7 +407,8 @@ void AppListItemView::OnMouseCaptureLost() { bool AppListItemView::OnMouseDragged(const ui::MouseEvent& event) { CustomButton::OnMouseDragged(event); - apps_grid_view_->UpdateDragFromItem(AppsGridView::MOUSE, event); + if (apps_grid_view_->IsDraggedView(this)) + apps_grid_view_->UpdateDragFromItem(AppsGridView::MOUSE, event); // Shows dragging UI when it's confirmed without waiting for the timer. if (ui_state_ != UI_STATE_DRAGGING && @@ -428,7 +429,7 @@ void AppListItemView::OnGestureEvent(ui::GestureEvent* event) { } break; case ui::ET_GESTURE_SCROLL_UPDATE: - if (touch_dragging_) { + if (touch_dragging_ && apps_grid_view_->IsDraggedView(this)) { apps_grid_view_->UpdateDragFromItem(AppsGridView::TOUCH, *event); event->SetHandled(); } diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc index 3c486ca..242501d 100644 --- a/ui/app_list/views/apps_grid_view.cc +++ b/ui/app_list/views/apps_grid_view.cc @@ -513,9 +513,8 @@ void AppsGridView::CleanUpSynchronousDrag() { void AppsGridView::UpdateDragFromItem(Pointer pointer, const ui::LocatedEvent& event) { - // EndDrag was called before if |drag_view_| is NULL. - if (!drag_view_) - return; + DCHECK(drag_view_); + gfx::Point drag_point_in_grid_view; ExtractDragLocation(event, &drag_point_in_grid_view); UpdateDrag(pointer, drag_point_in_grid_view); |