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

Side by Side Diff: ui/app_list/test/app_list_test_model.cc

Issue 466293002: Hardcode applist icon dimension and shadows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/kPreferredIconDimension/kGridIconDimension/g, move header Created 6 years, 4 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 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/test/app_list_test_model.h" 5 #include "ui/app_list/test/app_list_test_model.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "grit/ui_resources.h" 9 #include "grit/ui_resources.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 14 matching lines...) Expand all
25 // static 25 // static
26 const char AppListTestModel::kItemType[] = "TestItem"; 26 const char AppListTestModel::kItemType[] = "TestItem";
27 27
28 // AppListTestModel::AppListTestItem 28 // AppListTestModel::AppListTestItem
29 29
30 AppListTestModel::AppListTestItem::AppListTestItem( 30 AppListTestModel::AppListTestItem::AppListTestItem(
31 const std::string& id, 31 const std::string& id,
32 AppListTestModel* model) 32 AppListTestModel* model)
33 : AppListItem(id), 33 : AppListItem(id),
34 model_(model) { 34 model_(model) {
35 SetIcon(CreateImageSkia(kPreferredIconDimension, kPreferredIconDimension), 35 SetIcon(CreateImageSkia(kGridIconDimension, kGridIconDimension),
36 false /* has_shadow */); 36 false /* has_shadow */);
37 } 37 }
38 38
39 AppListTestModel::AppListTestItem::~AppListTestItem() { 39 AppListTestModel::AppListTestItem::~AppListTestItem() {
40 } 40 }
41 41
42 void AppListTestModel::AppListTestItem::Activate(int event_flags) { 42 void AppListTestModel::AppListTestItem::Activate(int event_flags) {
43 model_->ItemActivated(this); 43 model_->ItemActivated(this);
44 } 44 }
45 45
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 item->SetHighlighted(true); 156 item->SetHighlighted(true);
157 } 157 }
158 158
159 void AppListTestModel::ItemActivated(AppListTestItem* item) { 159 void AppListTestModel::ItemActivated(AppListTestItem* item) {
160 last_activated_ = item; 160 last_activated_ = item;
161 ++activate_count_; 161 ++activate_count_;
162 } 162 }
163 163
164 } // namespace test 164 } // namespace test
165 } // namespace app_list 165 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698