Roll src/third_party/WebKit f298044:aa8346d (svn 202628:202629)
[chromium-blink-merge.git] / chrome / browser / extensions / webstore_data_fetcher_delegate.h
blob7f864e9704b8284977806d46b7f289dd2ee6b083
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace base {
13 class DictionaryValue;
16 namespace extensions {
18 class WebstoreDataFetcherDelegate {
19 public:
20 // Invoked when the web store data request failed.
21 virtual void OnWebstoreRequestFailure() = 0;
23 // Invoked when the web store response parsing is successful. Delegate takes
24 // ownership of |webstore_data|.
25 virtual void OnWebstoreResponseParseSuccess(
26 scoped_ptr<base::DictionaryValue> webstore_data) = 0;
28 // Invoked when the web store response parsing is failed.
29 virtual void OnWebstoreResponseParseFailure(const std::string& error) = 0;
31 // Keys for indexing the returned webstore data.
32 static const char kAverageRatingKey[];
33 static const char kIconUrlKey[];
34 static const char kIdKey[];
35 static const char kInlineInstallNotSupportedKey[];
36 static const char kLocalizedDescriptionKey[];
37 static const char kLocalizedNameKey[];
38 static const char kManifestKey[];
39 static const char kRatingCountKey[];
40 static const char kRedirectUrlKey[];
41 static const char kShowUserCountKey[];
42 static const char kUsersKey[];
43 static const char kVerifiedSiteKey[];
44 static const char kVerifiedSitesKey[];
46 protected:
47 virtual ~WebstoreDataFetcherDelegate() {}
50 } // namespace extensions
52 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_DATA_FETCHER_DELEGATE_H_