| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_UI_APP_ICON_LOADER_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_ICON_LOADER_H_ |
| 6 #define CHROME_BROWSER_UI_APP_ICON_LOADER_H_ | 6 #define CHROME_BROWSER_UI_APP_ICON_LOADER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "chrome/browser/ui/app_icon_loader_delegate.h" | 11 #include "chrome/browser/ui/app_icon_loader_delegate.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 namespace gfx { | |
| 16 class ImageSkia; | |
| 17 } | |
| 18 | |
| 19 // Base class that loads and updates Chrome app's icons. | 15 // Base class that loads and updates Chrome app's icons. |
| 20 class AppIconLoader { | 16 class AppIconLoader { |
| 21 public: | 17 public: |
| 22 virtual ~AppIconLoader(); | 18 virtual ~AppIconLoader(); |
| 23 | 19 |
| 24 // Returns true is this AppIconLoader is able to load an image for the | 20 // Returns true is this AppIconLoader is able to load an image for the |
| 25 // requested app. | 21 // requested app. |
| 26 virtual bool CanLoadImageForApp(const std::string& app_id) = 0; | 22 virtual bool CanLoadImageForApp(const std::string& app_id) = 0; |
| 27 | 23 |
| 28 // Fetches the image for the specified id. When done (which may be | 24 // Fetches the image for the specified id. When done (which may be |
| (...skipping 22 matching lines...) Expand all Loading... |
| 51 Profile* const profile_ = nullptr; | 47 Profile* const profile_ = nullptr; |
| 52 const int icon_size_ = 0; | 48 const int icon_size_ = 0; |
| 53 | 49 |
| 54 // The delegate object which receives the icon images. No ownership. | 50 // The delegate object which receives the icon images. No ownership. |
| 55 AppIconLoaderDelegate* const delegate_ = nullptr; | 51 AppIconLoaderDelegate* const delegate_ = nullptr; |
| 56 | 52 |
| 57 DISALLOW_COPY_AND_ASSIGN(AppIconLoader); | 53 DISALLOW_COPY_AND_ASSIGN(AppIconLoader); |
| 58 }; | 54 }; |
| 59 | 55 |
| 60 #endif // CHROME_BROWSER_UI_APP_ICON_LOADER_H_ | 56 #endif // CHROME_BROWSER_UI_APP_ICON_LOADER_H_ |
| OLD | NEW |