| OLD | NEW |
| 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" | |
| 10 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
| 11 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | |
| 13 #include "ui/gfx/image/image_skia.h" | 11 #include "ui/gfx/image/image_skia.h" |
| 14 | 12 |
| 15 namespace app_list { | 13 namespace app_list { |
| 16 namespace test { | 14 namespace test { |
| 17 | 15 |
| 18 gfx::ImageSkia CreateImageSkia(int width, int height) { | 16 gfx::ImageSkia CreateImageSkia(int width, int height) { |
| 19 SkBitmap bitmap; | 17 SkBitmap bitmap; |
| 20 bitmap.allocN32Pixels(width, height); | 18 bitmap.allocN32Pixels(width, height); |
| 21 bitmap.eraseARGB(255, 0, 255, 0); | 19 bitmap.eraseARGB(255, 0, 255, 0); |
| 22 return gfx::ImageSkia::CreateFrom1xBitmap(bitmap); | 20 return gfx::ImageSkia::CreateFrom1xBitmap(bitmap); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 item->SetHighlighted(true); | 154 item->SetHighlighted(true); |
| 157 } | 155 } |
| 158 | 156 |
| 159 void AppListTestModel::ItemActivated(AppListTestItem* item) { | 157 void AppListTestModel::ItemActivated(AppListTestItem* item) { |
| 160 last_activated_ = item; | 158 last_activated_ = item; |
| 161 ++activate_count_; | 159 ++activate_count_; |
| 162 } | 160 } |
| 163 | 161 |
| 164 } // namespace test | 162 } // namespace test |
| 165 } // namespace app_list | 163 } // namespace app_list |
| OLD | NEW |