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