Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/extensions/extension_install_prompt.h

Issue 11150002: New post-sideload UI: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 class ExtensionInstallPrompt : public ImageLoadingTracker::Observer, 46 class ExtensionInstallPrompt : public ImageLoadingTracker::Observer,
47 public OAuth2MintTokenFlow::Delegate { 47 public OAuth2MintTokenFlow::Delegate {
48 public: 48 public:
49 enum PromptType { 49 enum PromptType {
50 UNSET_PROMPT_TYPE = -1, 50 UNSET_PROMPT_TYPE = -1,
51 INSTALL_PROMPT = 0, 51 INSTALL_PROMPT = 0,
52 INLINE_INSTALL_PROMPT, 52 INLINE_INSTALL_PROMPT,
53 BUNDLE_INSTALL_PROMPT, 53 BUNDLE_INSTALL_PROMPT,
54 RE_ENABLE_PROMPT, 54 RE_ENABLE_PROMPT,
55 PERMISSIONS_PROMPT, 55 PERMISSIONS_PROMPT,
56 EXTERNAL_INSTALL_PROMPT,
56 NUM_PROMPT_TYPES 57 NUM_PROMPT_TYPES
57 }; 58 };
58 59
59 // Extra information needed to display an installation or uninstallation 60 // Extra information needed to display an installation or uninstallation
60 // prompt. Gets populated with raw data and exposes getters for formatted 61 // prompt. Gets populated with raw data and exposes getters for formatted
61 // strings so that the GTK/views/Cocoa install dialogs don't have to repeat 62 // strings so that the GTK/views/Cocoa install dialogs don't have to repeat
62 // that logic. 63 // that logic.
63 class Prompt { 64 class Prompt {
64 public: 65 public:
65 Prompt(Profile* profile, PromptType type); 66 Prompt(Profile* profile, PromptType type);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 const extensions::Extension* extension, 227 const extensions::Extension* extension,
227 const ShowDialogCallback& show_dialog_callback); 228 const ShowDialogCallback& show_dialog_callback);
228 229
229 // This is called by the app handler launcher to verify whether the app 230 // This is called by the app handler launcher to verify whether the app
230 // should be re-enabled. This is declared virtual for testing. 231 // should be re-enabled. This is declared virtual for testing.
231 // 232 //
232 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. 233 // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
233 virtual void ConfirmReEnable(Delegate* delegate, 234 virtual void ConfirmReEnable(Delegate* delegate,
234 const extensions::Extension* extension); 235 const extensions::Extension* extension);
235 236
237 virtual void ConfirmExternalInstall(Delegate* delegate,
Jeffrey Yasskin 2012/10/13 21:17:35 Comment this function. It might make sense to refa
Matt Perry 2012/10/15 19:13:38 Done.
238 const extensions::Extension* extension);
239
236 // This is called by the extension permissions API to verify whether an 240 // This is called by the extension permissions API to verify whether an
237 // extension may be granted additional permissions. 241 // extension may be granted additional permissions.
238 // 242 //
239 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. 243 // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
240 virtual void ConfirmPermissions(Delegate* delegate, 244 virtual void ConfirmPermissions(Delegate* delegate,
241 const extensions::Extension* extension, 245 const extensions::Extension* extension,
242 const extensions::PermissionSet* permissions); 246 const extensions::PermissionSet* permissions);
243 247
244 // This is called by the extension identity API to verify whether an 248 // This is called by the extension identity API to verify whether an
245 // extension can be granted an OAuth2 token. 249 // extension can be granted an OAuth2 token.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 340
337 // Creates an ExtensionInstallPrompt from |browser|. Caller assumes ownership. 341 // Creates an ExtensionInstallPrompt from |browser|. Caller assumes ownership.
338 // TODO(beng): remove this once various extensions types are weaned from 342 // TODO(beng): remove this once various extensions types are weaned from
339 // Browser. 343 // Browser.
340 ExtensionInstallPrompt* CreateExtensionInstallPromptWithBrowser( 344 ExtensionInstallPrompt* CreateExtensionInstallPromptWithBrowser(
341 Browser* browser); 345 Browser* browser);
342 346
343 } // namespace chrome 347 } // namespace chrome
344 348
345 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ 349 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698