OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INSTALL_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
287 const extensions::Extension* extension, | 287 const extensions::Extension* extension, |
288 const IssueAdviceInfo& issue_advice); | 288 const IssueAdviceInfo& issue_advice); |
289 | 289 |
290 // This is called by the app handler launcher to review what permissions the | 290 // This is called by the app handler launcher to review what permissions the |
291 // extension or app currently has. | 291 // extension or app currently has. |
292 // | 292 // |
293 // This *WILL* call Abort() on |delegate|. | 293 // This *WILL* call Abort() on |delegate|. |
294 virtual void ReviewPermissions(Delegate* delegate, | 294 virtual void ReviewPermissions(Delegate* delegate, |
295 const extensions::Extension* extension); | 295 const extensions::Extension* extension); |
296 | 296 |
297 virtual void PermissionsDialog(Delegate* delegate, | |
asargent_no_longer_on_chrome
2013/03/27 19:27:04
nit: Please add a brief comment about what this do
| |
298 const extensions::Extension* extension); | |
299 | |
297 // Installation was successful. This is declared virtual for testing. | 300 // Installation was successful. This is declared virtual for testing. |
298 virtual void OnInstallSuccess(const extensions::Extension* extension, | 301 virtual void OnInstallSuccess(const extensions::Extension* extension, |
299 SkBitmap* icon); | 302 SkBitmap* icon); |
300 | 303 |
301 // Installation failed. This is declared virtual for testing. | 304 // Installation failed. This is declared virtual for testing. |
302 virtual void OnInstallFailure(const extensions::CrxInstallerError& error); | 305 virtual void OnInstallFailure(const extensions::CrxInstallerError& error); |
303 | 306 |
304 protected: | 307 protected: |
305 friend class extensions::ExtensionWebstorePrivateApiTest; | 308 friend class extensions::ExtensionWebstorePrivateApiTest; |
306 friend class extensions::MockGetAuthTokenFunction; | 309 friend class extensions::MockGetAuthTokenFunction; |
307 friend class WebstoreStartupInstallUnpackFailureTest; | 310 friend class WebstoreStartupInstallUnpackFailureTest; |
308 | 311 |
309 // Whether or not we should record the oauth2 grant upon successful install. | 312 // Whether or not we should record the oauth2 grant upon successful install. |
310 bool record_oauth2_grant_; | 313 bool record_oauth2_grant_; |
311 | 314 |
312 private: | 315 private: |
313 friend class GalleryInstallApiTestObserver; | 316 friend class GalleryInstallApiTestObserver; |
317 friend class ExtensionPermissionsPrompt; | |
314 | 318 |
315 // Sets the icon that will be used in any UI. If |icon| is NULL, or contains | 319 // Sets the icon that will be used in any UI. If |icon| is NULL, or contains |
316 // an empty bitmap, then a default icon will be used instead. | 320 // an empty bitmap, then a default icon will be used instead. |
317 void SetIcon(const SkBitmap* icon); | 321 void SetIcon(const SkBitmap* icon); |
318 | 322 |
319 // ImageLoader callback. | 323 // ImageLoader callback. |
320 void OnImageLoaded(const gfx::Image& image); | 324 void OnImageLoaded(const gfx::Image& image); |
321 | 325 |
322 // Starts the process of showing a confirmation UI, which is split into two. | 326 // Starts the process of showing a confirmation UI, which is split into two. |
323 // 1) Set off a 'load icon' task. | 327 // 1) Set off a 'load icon' task. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 // A pre-filled prompt. | 367 // A pre-filled prompt. |
364 Prompt prompt_; | 368 Prompt prompt_; |
365 | 369 |
366 scoped_ptr<OAuth2MintTokenFlow> token_flow_; | 370 scoped_ptr<OAuth2MintTokenFlow> token_flow_; |
367 | 371 |
368 // Used to show the confirm dialog. | 372 // Used to show the confirm dialog. |
369 ShowDialogCallback show_dialog_callback_; | 373 ShowDialogCallback show_dialog_callback_; |
370 }; | 374 }; |
371 | 375 |
372 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 376 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
OLD | NEW |