OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSION_WEBSTORE_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 NO_GESTURE, | 76 NO_GESTURE, |
77 | 77 |
78 // Invalid icon url. | 78 // Invalid icon url. |
79 INVALID_ICON_URL | 79 INVALID_ICON_URL |
80 }; | 80 }; |
81 | 81 |
82 // For use only in tests - sets a flag that can cause this function to ignore | 82 // For use only in tests - sets a flag that can cause this function to ignore |
83 // the normal requirement that it is called during a user gesture. | 83 // the normal requirement that it is called during a user gesture. |
84 static void SetIgnoreUserGestureForTests(bool ignore); | 84 static void SetIgnoreUserGestureForTests(bool ignore); |
85 | 85 |
86 // For use only in tests - sets a flag that makes invocations of | |
87 // beginInstallWithManifest skip putting up a real dialog, and instead act | |
88 // as if the dialog choice was to proceed or abort. | |
89 static void SetAutoConfirmForTests(bool should_proceed); | |
90 | |
91 // Implementing WebstoreInstallHelper::Delegate interface. | 86 // Implementing WebstoreInstallHelper::Delegate interface. |
92 virtual void OnWebstoreParseSuccess( | 87 virtual void OnWebstoreParseSuccess( |
93 const SkBitmap& icon, | 88 const SkBitmap& icon, |
94 base::DictionaryValue* parsed_manifest) OVERRIDE; | 89 base::DictionaryValue* parsed_manifest) OVERRIDE; |
95 virtual void OnWebstoreParseFailure( | 90 virtual void OnWebstoreParseFailure( |
96 InstallHelperResultCode result_code, | 91 InstallHelperResultCode result_code, |
97 const std::string& error_message) OVERRIDE; | 92 const std::string& error_message) OVERRIDE; |
98 | 93 |
99 // Implementing ExtensionInstallUI::Delegate interface. | 94 // Implementing ExtensionInstallUI::Delegate interface. |
100 virtual void InstallUIProceed() OVERRIDE; | 95 virtual void InstallUIProceed() OVERRIDE; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // Are we waiting for a token available notification? | 166 // Are we waiting for a token available notification? |
172 bool waiting_for_token_; | 167 bool waiting_for_token_; |
173 | 168 |
174 // Used for listening for TokenService notifications. | 169 // Used for listening for TokenService notifications. |
175 NotificationRegistrar registrar_; | 170 NotificationRegistrar registrar_; |
176 | 171 |
177 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.promptBrowserLogin"); | 172 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.promptBrowserLogin"); |
178 }; | 173 }; |
179 | 174 |
180 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ | 175 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ |
OLD | NEW |