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_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class DictionaryValue; | 11 class DictionaryValue; |
12 } | 12 } |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 class WebstoreDataFetcherDelegate { | 16 class WebstoreDataFetcherDelegate { |
17 public: | 17 public: |
18 // Invoked when the web store data request failed. | 18 // Invoked when the web store data request failed. |
19 virtual void OnWebstoreRequestFailure() = 0; | 19 virtual void OnWebstoreRequestFailure() = 0; |
20 | 20 |
21 // Invoked when the web store response parsing is successful. Delegate takes | 21 // Invoked when the web store response parsing is successful. Delegate takes |
22 // ownership of |webstore_data|. | 22 // ownership of |webstore_data|. |
23 virtual void OnWebstoreResponseParseSuccess( | 23 virtual void OnWebstoreResponseParseSuccess( |
24 base::DictionaryValue* webstore_data) = 0; | 24 scoped_ptr<base::DictionaryValue> webstore_data) = 0; |
25 | 25 |
26 // Invoked when the web store response parsing is failed. | 26 // Invoked when the web store response parsing is failed. |
27 virtual void OnWebstoreResponseParseFailure(const std::string& error) = 0; | 27 virtual void OnWebstoreResponseParseFailure(const std::string& error) = 0; |
28 | 28 |
29 protected: | 29 protected: |
30 virtual ~WebstoreDataFetcherDelegate() {} | 30 virtual ~WebstoreDataFetcherDelegate() {} |
31 }; | 31 }; |
32 | 32 |
33 } // namespace extensions | 33 } // namespace extensions |
34 | 34 |
35 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_ | 35 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_ |
OLD | NEW |