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

Side by Side Diff: ui/app_list/views/app_list_folder_view.cc

Issue 1846683004: App list: Fixed folder reparenting calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tapted-applist-deprecation-mac
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/app_list_folder_view.h" 5 #include "ui/app_list/views/app_list_folder_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/accessibility/ax_view_state.h" 9 #include "ui/accessibility/ax_view_state.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 original_drag_view, to_root_level_grid, has_native_drag); 287 original_drag_view, to_root_level_grid, has_native_drag);
288 container_view_->ReparentFolderItemTransit(folder_item_); 288 container_view_->ReparentFolderItemTransit(folder_item_);
289 } 289 }
290 290
291 void AppListFolderView::DispatchDragEventForReparent( 291 void AppListFolderView::DispatchDragEventForReparent(
292 AppsGridView::Pointer pointer, 292 AppsGridView::Pointer pointer,
293 const gfx::Point& drag_point_in_folder_grid) { 293 const gfx::Point& drag_point_in_folder_grid) {
294 AppsGridView* root_grid = container_view_->apps_grid_view(); 294 AppsGridView* root_grid = container_view_->apps_grid_view();
295 gfx::Point drag_point_in_root_grid = drag_point_in_folder_grid; 295 gfx::Point drag_point_in_root_grid = drag_point_in_folder_grid;
296 ConvertPointToTarget(items_grid_view_, root_grid, &drag_point_in_root_grid); 296 ConvertPointToTarget(items_grid_view_, root_grid, &drag_point_in_root_grid);
297 root_grid->UpdateDragFromReparentItem(pointer, drag_point_in_folder_grid); 297 root_grid->UpdateDragFromReparentItem(pointer, drag_point_in_root_grid);
298 } 298 }
299 299
300 void AppListFolderView::DispatchEndDragEventForReparent( 300 void AppListFolderView::DispatchEndDragEventForReparent(
301 bool events_forwarded_to_drag_drop_host, 301 bool events_forwarded_to_drag_drop_host,
302 bool cancel_drag) { 302 bool cancel_drag) {
303 container_view_->apps_grid_view()->EndDragFromReparentItemInRootLevel( 303 container_view_->apps_grid_view()->EndDragFromReparentItemInRootLevel(
304 events_forwarded_to_drag_drop_host, cancel_drag); 304 events_forwarded_to_drag_drop_host, cancel_drag);
305 container_view_->ReparentDragEnded(); 305 container_view_->ReparentDragEnded();
306 } 306 }
307 307
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 void AppListFolderView::GiveBackFocusToSearchBox() { 343 void AppListFolderView::GiveBackFocusToSearchBox() {
344 app_list_main_view_->search_box_view()->search_box()->RequestFocus(); 344 app_list_main_view_->search_box_view()->search_box()->RequestFocus();
345 } 345 }
346 346
347 void AppListFolderView::SetItemName(AppListFolderItem* item, 347 void AppListFolderView::SetItemName(AppListFolderItem* item,
348 const std::string& name) { 348 const std::string& name) {
349 model_->SetItemName(item, name); 349 model_->SetItemName(item, name);
350 } 350 }
351 351
352 } // namespace app_list 352 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698