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

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

Issue 6721013: extensions: Refactor ExtensionInstallUI class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove virtual keyword Created 9 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_generic_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_GENERIC_DIALOG_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GENERIC_DIALOG_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/extensions/image_loading_tracker.h"
12 #include "chrome/browser/extensions/extension_install_ui.h"
13
14 class MessageLoop;
15
16 class ExtensionGenericDialog : public ImageLoadingTracker::Observer {
17 public:
18 enum DialogType {
19 DIALOG_UNSET = -1,
20 DIALOG_INSTALL = 0,
Aaron Boodman 2011/03/23 00:30:19 This one is unneeded in the new world.
21 DIALOG_UNINSTALL,
22 DIALOG_RE_ENABLE,
23 DIALOG_NUM_TYPES
24 };
Aaron Boodman 2011/03/23 00:30:19 You will need to move ExtensionInstallUI::Delegate
25
26 ExtensionGenericDialog();
27 virtual ~ExtensionGenericDialog();
28
29 // This is called by the extensions management page to verify whether the
30 // uninstallation should proceed. This is declared virtual for testing.
31 //
32 // We *MUST* eventually call either Proceed() or Abort()
33 // on |delegate|.
34 void ConfirmUninstall(ExtensionInstallUI::Delegate* delegate,
Aaron Boodman 2011/03/23 00:30:19 It might be good to replace these with a single Co
35 const Extension* extension);
36
37 // This is called by the app handler launcher to verify whether the app
38 // should be re-enabled. This is declared virtual for testing.
39 //
40 // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
41 void ConfirmReenable(ExtensionInstallUI::Delegate* delegate,
42 const Extension* extension);
43
44 private:
45 // Starts the process of showing a confirmation UI, which is split into two.
46 // 1) Set off a 'load icon' task.
47 // 2) Handle the load icon response and show the UI (OnImageLoaded).
48 void ShowConfirmation(DialogType dialog_type);
49
50 // ImageLoadingTracker::Observer:
51 virtual void OnImageLoaded(SkBitmap* image,
52 const ExtensionResource& resource,
53 int index) OVERRIDE;
54
55 MessageLoop* ui_loop_;
56
57 DISALLOW_COPY_AND_ASSIGN(ExtensionGenericDialog);
58 };
59
60 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GENERIC_DIALOG_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_generic_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698