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

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

Issue 788493002: app_list: Enable level 1 of cpplint, be stricker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert PRESUBMIT.py changes Created 6 years 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 | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/cached_label.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/apps_grid_view.h" 5 #include "ui/app_list/views/apps_grid_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 void EndDragExternally() { 285 void EndDragExternally() {
286 CancelDrag(); 286 CancelDrag();
287 DCHECK(drag_view_); 287 DCHECK(drag_view_);
288 drag_view_->SetVisible(true); 288 drag_view_->SetVisible(true);
289 drag_view_ = NULL; 289 drag_view_ = NULL;
290 } 290 }
291 291
292 private: 292 private:
293 // Overridden from ui::DragSourceWin. 293 // Overridden from ui::DragSourceWin.
294 virtual void OnDragSourceCancel() override { 294 void OnDragSourceCancel() override { canceled_ = true; }
295 canceled_ = true;
296 }
297 295
298 virtual void OnDragSourceDrop() override { 296 void OnDragSourceDrop() override {}
299 }
300 297
301 virtual void OnDragSourceMove() override { 298 void OnDragSourceMove() override {
302 grid_view_->UpdateDrag(AppsGridView::MOUSE, GetCursorInGridViewCoords()); 299 grid_view_->UpdateDrag(AppsGridView::MOUSE, GetCursorInGridViewCoords());
303 } 300 }
304 301
305 void SetupExchangeData(ui::OSExchangeData* data) { 302 void SetupExchangeData(ui::OSExchangeData* data) {
306 data->SetFilename(shortcut_path_); 303 data->SetFilename(shortcut_path_);
307 gfx::ImageSkia image(drag_view_->GetDragImage()); 304 gfx::ImageSkia image(drag_view_->GetDragImage());
308 gfx::Size image_size(image.size()); 305 gfx::Size image_size(image.size());
309 drag_utils::SetDragImageOnDataObject( 306 drag_utils::SetDragImageOnDataObject(
310 image, 307 image,
311 drag_view_offset_ - drag_view_->GetDragImageOffset(), 308 drag_view_offset_ - drag_view_->GetDragImageOffset(),
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 2168
2172 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, 2169 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index,
2173 bool is_target_folder) { 2170 bool is_target_folder) {
2174 AppListItemView* target_view = 2171 AppListItemView* target_view =
2175 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot); 2172 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot);
2176 if (target_view) 2173 if (target_view)
2177 target_view->SetAsAttemptedFolderTarget(is_target_folder); 2174 target_view->SetAsAttemptedFolderTarget(is_target_folder);
2178 } 2175 }
2179 2176
2180 } // namespace app_list 2177 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/cached_label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698