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

Side by Side Diff: chrome/browser/extensions/extension_uninstall_dialog.h

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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) 2011 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/extensions/image_loading_tracker.h" 12 #include "chrome/browser/extensions/image_loading_tracker.h"
13 #include "third_party/skia/include/core/SkBitmap.h" 13 #include "ui/gfx/image/image_skia.h"
14 14
15 class MessageLoop; 15 class MessageLoop;
16 class Profile; 16 class Profile;
17 17
18 namespace extensions { 18 namespace extensions {
19 class Extension; 19 class Extension;
20 } 20 }
21 21
22 class ExtensionUninstallDialog 22 class ExtensionUninstallDialog
23 : public ImageLoadingTracker::Observer, 23 : public ImageLoadingTracker::Observer,
(...skipping 29 matching lines...) Expand all
53 53
54 Profile* profile_; 54 Profile* profile_;
55 55
56 // The delegate we will call Accepted/Canceled on after confirmation dialog. 56 // The delegate we will call Accepted/Canceled on after confirmation dialog.
57 Delegate* delegate_; 57 Delegate* delegate_;
58 58
59 // The extension we are showing the dialog for. 59 // The extension we are showing the dialog for.
60 const extensions::Extension* extension_; 60 const extensions::Extension* extension_;
61 61
62 // The extensions icon. 62 // The extensions icon.
63 SkBitmap icon_; 63 gfx::ImageSkia icon_;
64 64
65 private: 65 private:
66 // Sets the icon that will be used in the dialog. If |icon| contains an empty 66 // Sets the icon that will be used in the dialog. If |icon| contains an empty
67 // bitmap, then we use a default icon instead. 67 // image, then we use a default icon instead.
68 void SetIcon(const gfx::Image& image); 68 void SetIcon(const gfx::Image& image);
69 69
70 // ImageLoadingTracker::Observer: 70 // ImageLoadingTracker::Observer:
71 virtual void OnImageLoaded(const gfx::Image& image, 71 virtual void OnImageLoaded(const gfx::Image& image,
72 const std::string& extension_id, 72 const std::string& extension_id,
73 int index) OVERRIDE; 73 int index) OVERRIDE;
74 74
75 // Displays the prompt. This should only be called after loading the icon. 75 // Displays the prompt. This should only be called after loading the icon.
76 // The implementations of this method are platform-specific. 76 // The implementations of this method are platform-specific.
77 virtual void Show() = 0; 77 virtual void Show() = 0;
78 78
79 MessageLoop* ui_loop_; 79 MessageLoop* ui_loop_;
80 80
81 // Keeps track of extension images being loaded on the File thread for the 81 // Keeps track of extension images being loaded on the File thread for the
82 // purpose of showing the dialog. 82 // purpose of showing the dialog.
83 ImageLoadingTracker tracker_; 83 ImageLoadingTracker tracker_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); 85 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog);
86 }; 86 };
87 87
88 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ 88 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/browser/extensions/extension_uninstall_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698