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

Side by Side Diff: athena/extensions/extension_app_model_builder.cc

Issue 653563004: NULL -> nullptr under athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 2 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
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/extensions/public/extension_app_model_builder.h" 5 #include "athena/extensions/public/extension_app_model_builder.h"
6 6
7 #include "athena/activity/public/activity_factory.h" 7 #include "athena/activity/public/activity_factory.h"
8 #include "athena/activity/public/activity_manager.h" 8 #include "athena/activity/public/activity_manager.h"
9 #include "athena/extensions/public/extensions_delegate.h" 9 #include "athena/extensions/public/extensions_delegate.h"
10 #include "extensions/browser/extension_icon_image.h" 10 #include "extensions/browser/extension_icon_image.h"
(...skipping 26 matching lines...) Expand all
37 37
38 void Reload(scoped_refptr<const extensions::Extension> extension) { 38 void Reload(scoped_refptr<const extensions::Extension> extension) {
39 extension_ = extension; 39 extension_ = extension;
40 icon_image_.reset(new extensions::IconImage( 40 icon_image_.reset(new extensions::IconImage(
41 browser_context_, 41 browser_context_,
42 extension.get(), 42 extension.get(),
43 extensions::IconsInfo::GetIcons(extension.get()), 43 extensions::IconsInfo::GetIcons(extension.get()),
44 extension_misc::EXTENSION_ICON_MEDIUM, 44 extension_misc::EXTENSION_ICON_MEDIUM,
45 *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 45 *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
46 IDR_APP_DEFAULT_ICON), 46 IDR_APP_DEFAULT_ICON),
47 NULL)); 47 nullptr));
48 icon_image_->image_skia().EnsureRepsForSupportedScales(); 48 icon_image_->image_skia().EnsureRepsForSupportedScales();
49 SetIcon(icon_image_->image_skia(), false); 49 SetIcon(icon_image_->image_skia(), false);
50 SetName(extension->name()); 50 SetName(extension->name());
51 } 51 }
52 52
53 private: 53 private:
54 // Overridden from app_list::AppListItem: 54 // Overridden from app_list::AppListItem:
55 virtual void Activate(int event_flags) override { 55 virtual void Activate(int event_flags) override {
56 ExtensionsDelegate::Get(browser_context_)->LaunchApp(extension_->id()); 56 ExtensionsDelegate::Get(browser_context_)->LaunchApp(extension_->id());
57 } 57 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 void ExtensionAppModelBuilder::OnExtensionUninstalled( 116 void ExtensionAppModelBuilder::OnExtensionUninstalled(
117 content::BrowserContext* browser_context, 117 content::BrowserContext* browser_context,
118 const extensions::Extension* extension, 118 const extensions::Extension* extension,
119 extensions::UninstallReason reason) { 119 extensions::UninstallReason reason) {
120 model_->DeleteItem(extension->id()); 120 model_->DeleteItem(extension->id());
121 } 121 }
122 122
123 } // namespace athena 123 } // namespace athena
OLDNEW
« no previous file with comments | « athena/extensions/chrome/extensions_delegate_impl.cc ('k') | athena/extensions/extensions_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698