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

Side by Side Diff: ash/test/test_launcher_delegate.cc

Issue 10699065: chromeos: Fix pixelated icons in app list and launcher (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, move Resize/CreateDropShadow into ImageSkiaSource Created 8 years, 5 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 "ash/test/test_launcher_delegate.h" 5 #include "ash/test/test_launcher_delegate.h"
6 6
7 #include "ash/launcher/launcher_model.h" 7 #include "ash/launcher/launcher_model.h"
8 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 18 matching lines...) Expand all
29 AddLauncherItem(window, STATUS_CLOSED); 29 AddLauncherItem(window, STATUS_CLOSED);
30 } 30 }
31 31
32 void TestLauncherDelegate::AddLauncherItem( 32 void TestLauncherDelegate::AddLauncherItem(
33 aura::Window* window, 33 aura::Window* window,
34 LauncherItemStatus status) { 34 LauncherItemStatus status) {
35 ash::LauncherItem item; 35 ash::LauncherItem item;
36 item.type = ash::TYPE_TABBED; 36 item.type = ash::TYPE_TABBED;
37 DCHECK(window_to_id_.find(window) == window_to_id_.end()); 37 DCHECK(window_to_id_.find(window) == window_to_id_.end());
38 window_to_id_[window] = model_->next_id(); 38 window_to_id_[window] = model_->next_id();
39 item.image.setConfig(SkBitmap::kARGB_8888_Config, 16, 16);
40 item.image.allocPixels();
41 item.status = status; 39 item.status = status;
42 model_->Add(item); 40 model_->Add(item);
43 if (observed_windows_.find(window->parent()) == observed_windows_.end()) { 41 if (observed_windows_.find(window->parent()) == observed_windows_.end()) {
44 window->parent()->AddObserver(this); 42 window->parent()->AddObserver(this);
45 observed_windows_.insert(window->parent()); 43 observed_windows_.insert(window->parent());
46 } 44 }
47 } 45 }
48 46
49 void TestLauncherDelegate::OnWillRemoveWindow(aura::Window* window) { 47 void TestLauncherDelegate::OnWillRemoveWindow(aura::Window* window) {
50 ash::LauncherID id = GetIDByWindow(window); 48 ash::LauncherID id = GetIDByWindow(window);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 105 }
108 return NULL; 106 return NULL;
109 } 107 }
110 108
111 bool TestLauncherDelegate::IsDraggable(const ash::LauncherItem& item) { 109 bool TestLauncherDelegate::IsDraggable(const ash::LauncherItem& item) {
112 return true; 110 return true;
113 } 111 }
114 112
115 } // namespace test 113 } // namespace test
116 } // namespace ash 114 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698