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

Side by Side Diff: athena/content/content_app_model_builder.cc

Issue 363933002: setConfig is deprecated, use setInfo or allocPixels instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « ash/system/chromeos/network/network_icon.cc ('k') | athena/test/test_app_model_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/content/public/content_app_model_builder.h" 5 #include "athena/content/public/content_app_model_builder.h"
6 6
7 #include "apps/shell/browser/shell_extension_system.h" 7 #include "apps/shell/browser/shell_extension_system.h"
8 #include "athena/activity/public/activity_factory.h" 8 #include "athena/activity/public/activity_factory.h"
9 #include "athena/activity/public/activity_manager.h" 9 #include "athena/activity/public/activity_manager.h"
10 #include "extensions/browser/extension_icon_image.h" 10 #include "extensions/browser/extension_icon_image.h"
(...skipping 10 matching lines...) Expand all
21 namespace { 21 namespace {
22 22
23 ShellExtensionSystem* GetShellExtensionSystem( 23 ShellExtensionSystem* GetShellExtensionSystem(
24 content::BrowserContext* context) { 24 content::BrowserContext* context) {
25 return static_cast<ShellExtensionSystem*>( 25 return static_cast<ShellExtensionSystem*>(
26 extensions::ExtensionSystem::Get(context)); 26 extensions::ExtensionSystem::Get(context));
27 } 27 }
28 28
29 gfx::ImageSkia CreateFlatColorImage(SkColor color) { 29 gfx::ImageSkia CreateFlatColorImage(SkColor color) {
30 SkBitmap bitmap; 30 SkBitmap bitmap;
31 bitmap.setConfig( 31 bitmap.allocN32Pixels(extension_misc::EXTENSION_ICON_MEDIUM,
32 SkBitmap::kARGB_8888_Config, 32 extension_misc::EXTENSION_ICON_MEDIUM);
33 extension_misc::EXTENSION_ICON_MEDIUM,
34 extension_misc::EXTENSION_ICON_MEDIUM);
35 bitmap.allocPixels();
36 bitmap.eraseColor(color); 33 bitmap.eraseColor(color);
37 return gfx::ImageSkia::CreateFrom1xBitmap(bitmap); 34 return gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
38 } 35 }
39 36
40 // Same dummy item. 37 // Same dummy item.
41 class DummyItem : public app_list::AppListItem { 38 class DummyItem : public app_list::AppListItem {
42 public: 39 public:
43 DummyItem(const std::string& id, 40 DummyItem(const std::string& id,
44 const GURL& url, 41 const GURL& url,
45 SkColor color, 42 SkColor color,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 123
127 ShellExtensionSystem* extension_system = 124 ShellExtensionSystem* extension_system =
128 GetShellExtensionSystem(browser_context_); 125 GetShellExtensionSystem(browser_context_);
129 if (extension_system && extension_system->extension()) { 126 if (extension_system && extension_system->extension()) {
130 model->AddItem(scoped_ptr<app_list::AppListItem>( 127 model->AddItem(scoped_ptr<app_list::AppListItem>(
131 new AppItem(extension_system->extension(), browser_context_))); 128 new AppItem(extension_system->extension(), browser_context_)));
132 } 129 }
133 } 130 }
134 131
135 } // namespace athena 132 } // namespace athena
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/network_icon.cc ('k') | athena/test/test_app_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698