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

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

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ClearBorder() Created 6 years, 11 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 | Annotate | Revision Log
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 if (item_list_) 379 if (item_list_)
380 item_list_->RemoveObserver(this); 380 item_list_->RemoveObserver(this);
381 } 381 }
382 382
383 void AppsGridView::SetLayout(int icon_size, int cols, int rows_per_page) { 383 void AppsGridView::SetLayout(int icon_size, int cols, int rows_per_page) {
384 icon_size_.SetSize(icon_size, icon_size); 384 icon_size_.SetSize(icon_size, icon_size);
385 cols_ = cols; 385 cols_ = cols;
386 rows_per_page_ = rows_per_page; 386 rows_per_page_ = rows_per_page;
387 387
388 set_border(views::Border::CreateEmptyBorder(kTopPadding, 388 SetBorder(views::Border::CreateEmptyBorder(
389 kLeftRightPadding, 389 kTopPadding, kLeftRightPadding, 0, kLeftRightPadding));
390 0,
391 kLeftRightPadding));
392 } 390 }
393 391
394 void AppsGridView::SetModel(AppListModel* model) { 392 void AppsGridView::SetModel(AppListModel* model) {
395 if (model_) 393 if (model_)
396 model_->RemoveObserver(this); 394 model_->RemoveObserver(this);
397 395
398 model_ = model; 396 model_ = model;
399 if (model_) 397 if (model_)
400 model_->AddObserver(this); 398 model_->AddObserver(this);
401 399
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, 1693 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index,
1696 bool is_target_folder) { 1694 bool is_target_folder) {
1697 AppListItemView* target_view = 1695 AppListItemView* target_view =
1698 static_cast<AppListItemView*>( 1696 static_cast<AppListItemView*>(
1699 GetViewAtSlotOnCurrentPage(target_index.slot)); 1697 GetViewAtSlotOnCurrentPage(target_index.slot));
1700 if (target_view) 1698 if (target_view)
1701 target_view->SetAsAttemptedFolderTarget(is_target_folder); 1699 target_view->SetAsAttemptedFolderTarget(is_target_folder);
1702 } 1700 }
1703 1701
1704 } // namespace app_list 1702 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698