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

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

Issue 214423002: Reset the app list when it is shown on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_app_list_folder_drag_for_real
Patch Set: fix nits Created 6 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 | « ui/app_list/views/apps_grid_view.h ('k') | 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 (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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 void AppsGridView::SetLayout(int icon_size, int cols, int rows_per_page) { 361 void AppsGridView::SetLayout(int icon_size, int cols, int rows_per_page) {
362 icon_size_.SetSize(icon_size, icon_size); 362 icon_size_.SetSize(icon_size, icon_size);
363 cols_ = cols; 363 cols_ = cols;
364 rows_per_page_ = rows_per_page; 364 rows_per_page_ = rows_per_page;
365 365
366 SetBorder(views::Border::CreateEmptyBorder( 366 SetBorder(views::Border::CreateEmptyBorder(
367 kTopPadding, kLeftRightPadding, 0, kLeftRightPadding)); 367 kTopPadding, kLeftRightPadding, 0, kLeftRightPadding));
368 } 368 }
369 369
370 void AppsGridView::ResetForShowApps() {
371 activated_item_view_ = NULL;
372 layer()->SetOpacity(1.0f);
373 SetVisible(true);
374 // Set all views to visible in case they weren't made visible again by an
375 // incomplete animation.
376 for (int i = 0; i < view_model_.view_size(); ++i) {
377 view_model_.view_at(i)->SetVisible(true);
378 }
379 }
380
370 void AppsGridView::SetModel(AppListModel* model) { 381 void AppsGridView::SetModel(AppListModel* model) {
371 if (model_) 382 if (model_)
372 model_->RemoveObserver(this); 383 model_->RemoveObserver(this);
373 384
374 model_ = model; 385 model_ = model;
375 if (model_) 386 if (model_)
376 model_->AddObserver(this); 387 model_->AddObserver(this);
377 388
378 Update(); 389 Update();
379 } 390 }
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, 2092 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index,
2082 bool is_target_folder) { 2093 bool is_target_folder) {
2083 AppListItemView* target_view = 2094 AppListItemView* target_view =
2084 static_cast<AppListItemView*>( 2095 static_cast<AppListItemView*>(
2085 GetViewAtSlotOnCurrentPage(target_index.slot)); 2096 GetViewAtSlotOnCurrentPage(target_index.slot));
2086 if (target_view) 2097 if (target_view)
2087 target_view->SetAsAttemptedFolderTarget(is_target_folder); 2098 target_view->SetAsAttemptedFolderTarget(is_target_folder);
2088 } 2099 }
2089 2100
2090 } // namespace app_list 2101 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/apps_grid_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698