1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_ICON_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_APP_ICON_LOADER_H_
10 #include "base/basictypes.h"
16 namespace extensions
{
18 // Interface used to load app icons. This is in its own class so that it can
24 virtual ~Delegate() {}
26 // Called when the image for an app is loaded.
27 virtual void SetAppImage(const std::string
& id
,
28 const gfx::ImageSkia
& image
) = 0;
32 virtual ~AppIconLoader() {}
34 // Fetches the image for the specified id. When done (which may be
35 // synchronous), this should invoke SetAppImage() on the delegate.
36 virtual void FetchImage(const std::string
& id
) = 0;
38 // Clears the image for the specified id.
39 virtual void ClearImage(const std::string
& id
) = 0;
41 // Updates the image for the specified id. This is called to re-create
42 // the app icon with latest app state (enabled or disabled/terminiated).
43 // SetAppImage() is called when done.
44 virtual void UpdateImage(const std::string
& id
) = 0;
47 DISALLOW_COPY_AND_ASSIGN(AppIconLoader
);
50 } // namespace extensions
52 #endif // CHROME_BROWSER_EXTENSIONS_APP_ICON_LOADER_H_