| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_DATA_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_DATA_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_DATA_H_ | 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_DATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Loads app data from cache. If there is no cached data, fetches it | 48 // Loads app data from cache. If there is no cached data, fetches it |
| 49 // from web store. | 49 // from web store. |
| 50 void Load(); | 50 void Load(); |
| 51 | 51 |
| 52 // Clears locally cached data. | 52 // Clears locally cached data. |
| 53 void ClearCache(); | 53 void ClearCache(); |
| 54 | 54 |
| 55 // Returns true if web store data fetching is in progress. | 55 // Returns true if web store data fetching is in progress. |
| 56 bool IsLoading() const; | 56 bool IsLoading() const; |
| 57 | 57 |
| 58 const std::string& id() const { return id_; } | 58 const std::string& app_id() const { return app_id_; } |
| 59 const std::string& name() const { return name_; } | 59 const std::string& name() const { return name_; } |
| 60 const gfx::ImageSkia& icon() const { return icon_; } | 60 const gfx::ImageSkia& icon() const { return icon_; } |
| 61 const base::RefCountedString* raw_icon() const { | 61 const base::RefCountedString* raw_icon() const { |
| 62 return raw_icon_.get(); | 62 return raw_icon_.get(); |
| 63 } | 63 } |
| 64 Status status() const { return status_; } | 64 Status status() const { return status_; } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 class IconLoader; | 67 class IconLoader; |
| 68 class WebstoreDataParser; | 68 class WebstoreDataParser; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 93 // extensions::WebstoreDataFetcherDelegate overrides: | 93 // extensions::WebstoreDataFetcherDelegate overrides: |
| 94 virtual void OnWebstoreRequestFailure() OVERRIDE; | 94 virtual void OnWebstoreRequestFailure() OVERRIDE; |
| 95 virtual void OnWebstoreResponseParseSuccess( | 95 virtual void OnWebstoreResponseParseSuccess( |
| 96 base::DictionaryValue* webstore_data) OVERRIDE; | 96 base::DictionaryValue* webstore_data) OVERRIDE; |
| 97 virtual void OnWebstoreResponseParseFailure( | 97 virtual void OnWebstoreResponseParseFailure( |
| 98 const std::string& error) OVERRIDE; | 98 const std::string& error) OVERRIDE; |
| 99 | 99 |
| 100 KioskAppDataDelegate* delegate_; // not owned. | 100 KioskAppDataDelegate* delegate_; // not owned. |
| 101 Status status_; | 101 Status status_; |
| 102 | 102 |
| 103 std::string id_; | 103 std::string app_id_; |
| 104 std::string name_; | 104 std::string name_; |
| 105 gfx::ImageSkia icon_; | 105 gfx::ImageSkia icon_; |
| 106 scoped_refptr<base::RefCountedString> raw_icon_; | 106 scoped_refptr<base::RefCountedString> raw_icon_; |
| 107 | 107 |
| 108 scoped_ptr<extensions::WebstoreDataFetcher> webstore_fetcher_; | 108 scoped_ptr<extensions::WebstoreDataFetcher> webstore_fetcher_; |
| 109 base::FilePath icon_path_; | 109 base::FilePath icon_path_; |
| 110 | 110 |
| 111 DISALLOW_COPY_AND_ASSIGN(KioskAppData); | 111 DISALLOW_COPY_AND_ASSIGN(KioskAppData); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace chromeos | 114 } // namespace chromeos |
| 115 | 115 |
| 116 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_DATA_H_ | 116 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_DATA_H_ |
| OLD | NEW |