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

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 // This is called by the external install alert UI to verify whether the
238 // extension should be enabled (external extensions are installed disabled).
239 //
240 // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
241 virtual void ConfirmExternalInstall(Delegate* delegate,
242 const extensions::Extension* extension);
243
236 // This is called by the extension permissions API to verify whether an 244 // This is called by the extension permissions API to verify whether an
237 // extension may be granted additional permissions. 245 // extension may be granted additional permissions.
238 // 246 //
239 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. 247 // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
240 virtual void ConfirmPermissions(Delegate* delegate, 248 virtual void ConfirmPermissions(Delegate* delegate,
241 const extensions::Extension* extension, 249 const extensions::Extension* extension,
242 const extensions::PermissionSet* permissions); 250 const extensions::PermissionSet* permissions);
243 251
244 // This is called by the extension identity API to verify whether an 252 // This is called by the extension identity API to verify whether an
245 // extension can be granted an OAuth2 token. 253 // extension can be granted an OAuth2 token.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 344
337 // Creates an ExtensionInstallPrompt from |browser|. Caller assumes ownership. 345 // Creates an ExtensionInstallPrompt from |browser|. Caller assumes ownership.
338 // TODO(beng): remove this once various extensions types are weaned from 346 // TODO(beng): remove this once various extensions types are weaned from
339 // Browser. 347 // Browser.
340 ExtensionInstallPrompt* CreateExtensionInstallPromptWithBrowser( 348 ExtensionInstallPrompt* CreateExtensionInstallPromptWithBrowser(
341 Browser* browser); 349 Browser* browser);
342 350
343 } // namespace chrome 351 } // namespace chrome
344 352
345 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ 353 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_install_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698