| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 void OnIconLoadFailure(); | 103 void OnIconLoadFailure(); |
| 104 | 104 |
| 105 // Callbacks for WebstoreDataParser | 105 // Callbacks for WebstoreDataParser |
| 106 void OnWebstoreParseSuccess(const SkBitmap& icon); | 106 void OnWebstoreParseSuccess(const SkBitmap& icon); |
| 107 void OnWebstoreParseFailure(); | 107 void OnWebstoreParseFailure(); |
| 108 | 108 |
| 109 // Starts to fetch data from web store. | 109 // Starts to fetch data from web store. |
| 110 void StartFetch(); | 110 void StartFetch(); |
| 111 | 111 |
| 112 // extensions::WebstoreDataFetcherDelegate overrides: | 112 // extensions::WebstoreDataFetcherDelegate overrides: |
| 113 virtual void OnWebstoreRequestFailure() OVERRIDE; | 113 virtual void OnWebstoreRequestFailure() override; |
| 114 virtual void OnWebstoreResponseParseSuccess( | 114 virtual void OnWebstoreResponseParseSuccess( |
| 115 scoped_ptr<base::DictionaryValue> webstore_data) OVERRIDE; | 115 scoped_ptr<base::DictionaryValue> webstore_data) override; |
| 116 virtual void OnWebstoreResponseParseFailure( | 116 virtual void OnWebstoreResponseParseFailure( |
| 117 const std::string& error) OVERRIDE; | 117 const std::string& error) override; |
| 118 | 118 |
| 119 // Helper function for testing for the existence of |key| in | 119 // Helper function for testing for the existence of |key| in |
| 120 // |response|. Passes |key|'s content via |value| and returns | 120 // |response|. Passes |key|'s content via |value| and returns |
| 121 // true when |key| is present. | 121 // true when |key| is present. |
| 122 bool CheckResponseKeyValue(const base::DictionaryValue* response, | 122 bool CheckResponseKeyValue(const base::DictionaryValue* response, |
| 123 const char* key, | 123 const char* key, |
| 124 std::string* value); | 124 std::string* value); |
| 125 | 125 |
| 126 KioskAppDataDelegate* delegate_; // not owned. | 126 KioskAppDataDelegate* delegate_; // not owned. |
| 127 Status status_; | 127 Status status_; |
| 128 | 128 |
| 129 std::string app_id_; | 129 std::string app_id_; |
| 130 std::string user_id_; | 130 std::string user_id_; |
| 131 std::string name_; | 131 std::string name_; |
| 132 gfx::ImageSkia icon_; | 132 gfx::ImageSkia icon_; |
| 133 scoped_refptr<base::RefCountedString> raw_icon_; | 133 scoped_refptr<base::RefCountedString> raw_icon_; |
| 134 | 134 |
| 135 scoped_ptr<extensions::WebstoreDataFetcher> webstore_fetcher_; | 135 scoped_ptr<extensions::WebstoreDataFetcher> webstore_fetcher_; |
| 136 base::FilePath icon_path_; | 136 base::FilePath icon_path_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(KioskAppData); | 138 DISALLOW_COPY_AND_ASSIGN(KioskAppData); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace chromeos | 141 } // namespace chromeos |
| 142 | 142 |
| 143 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_DATA_H_ | 143 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_DATA_H_ |
| OLD | NEW |