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

Side by Side Diff: chrome/browser/ui/app_list/search/webstore/webstore_result.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@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 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 "chrome/browser/ui/app_list/search/webstore/webstore_result.h" 5 #include "chrome/browser/ui/app_list/search/webstore/webstore_result.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 25 matching lines...) Expand all
36 namespace { 36 namespace {
37 37
38 const int kLaunchEphemeralAppAction = 1; 38 const int kLaunchEphemeralAppAction = 1;
39 39
40 // BadgedImageSource adds a webstore badge to a webstore app icon. 40 // BadgedImageSource adds a webstore badge to a webstore app icon.
41 class BadgedIconSource : public gfx::CanvasImageSource { 41 class BadgedIconSource : public gfx::CanvasImageSource {
42 public: 42 public:
43 BadgedIconSource(const gfx::ImageSkia& icon, const gfx::Size& icon_size) 43 BadgedIconSource(const gfx::ImageSkia& icon, const gfx::Size& icon_size)
44 : CanvasImageSource(icon_size, false), icon_(icon) {} 44 : CanvasImageSource(icon_size, false), icon_(icon) {}
45 45
46 virtual void Draw(gfx::Canvas* canvas) override { 46 void Draw(gfx::Canvas* canvas) override {
47 canvas->DrawImageInt(icon_, 0, 0); 47 canvas->DrawImageInt(icon_, 0, 0);
48 const gfx::ImageSkia& badge = *ui::ResourceBundle::GetSharedInstance(). 48 const gfx::ImageSkia& badge = *ui::ResourceBundle::GetSharedInstance().
49 GetImageSkiaNamed(IDR_WEBSTORE_ICON_16); 49 GetImageSkiaNamed(IDR_WEBSTORE_ICON_16);
50 canvas->DrawImageInt( 50 canvas->DrawImageInt(
51 badge, icon_.width() - badge.width(), icon_.height() - badge.height()); 51 badge, icon_.width() - badge.width(), icon_.height() - badge.height());
52 } 52 }
53 53
54 private: 54 private:
55 gfx::ImageSkia icon_; 55 gfx::ImageSkia icon_;
56 56
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 void WebstoreResult::OnShutdown() { 296 void WebstoreResult::OnShutdown() {
297 StopObservingInstall(); 297 StopObservingInstall();
298 } 298 }
299 299
300 void WebstoreResult::OnShutdown(extensions::ExtensionRegistry* registry) { 300 void WebstoreResult::OnShutdown(extensions::ExtensionRegistry* registry) {
301 StopObservingRegistry(); 301 StopObservingRegistry();
302 } 302 }
303 303
304 } // namespace app_list 304 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698