| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/compiler_specific.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // The extension we are showing the dialog for. | 52 // The extension we are showing the dialog for. |
| 53 const Extension* extension_; | 53 const Extension* extension_; |
| 54 | 54 |
| 55 // The extensions icon. | 55 // The extensions icon. |
| 56 SkBitmap icon_; | 56 SkBitmap icon_; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 // Sets the icon that will be used in the dialog. If |icon| is NULL, or | 59 // Sets the icon that will be used in the dialog. If |icon| is NULL, or |
| 60 // contains an empty bitmap, then we use a default icon instead. | 60 // contains an empty bitmap, then we use a default icon instead. |
| 61 void SetIcon(SkBitmap* icon); | 61 void SetIcon(const gfx::Image* image); |
| 62 | 62 |
| 63 // ImageLoadingTracker::Observer: | 63 // ImageLoadingTracker::Observer: |
| 64 virtual void OnImageLoaded(SkBitmap* image, | 64 virtual void OnImageLoaded(const gfx::Image* image, |
| 65 const ExtensionResource& resource, | 65 const std::string& extension_id, |
| 66 int index) OVERRIDE; | 66 int index) OVERRIDE; |
| 67 | 67 |
| 68 // Displays the prompt. This should only be called after loading the icon. | 68 // Displays the prompt. This should only be called after loading the icon. |
| 69 // The implementations of this method are platform-specific. | 69 // The implementations of this method are platform-specific. |
| 70 virtual void Show() = 0; | 70 virtual void Show() = 0; |
| 71 | 71 |
| 72 MessageLoop* ui_loop_; | 72 MessageLoop* ui_loop_; |
| 73 | 73 |
| 74 // Keeps track of extension images being loaded on the File thread for the | 74 // Keeps track of extension images being loaded on the File thread for the |
| 75 // purpose of showing the dialog. | 75 // purpose of showing the dialog. |
| 76 ImageLoadingTracker tracker_; | 76 ImageLoadingTracker tracker_; |
| 77 | 77 |
| 78 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); | 78 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ | 81 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
| OLD | NEW |