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

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

Issue 11087071: Making ShowExtensionInstallDialog a callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments 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_DIALOG_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "chrome/browser/extensions/extension_install_prompt.h" 12 #include "chrome/browser/extensions/extension_install_prompt.h"
13 13
14 namespace base { 14 class ExtensionInstallDialog : public base::RefCounted<ExtensionInstallDialog> {
Aaron Boodman 2012/10/11 02:42:03 RefCounted is a design smell. Why does this need t
sail 2012/10/11 02:46:58 So if this isn't refcounted then it's not clear ho
15 class DictionaryValue; 15 public:
16 } 16 ExtensionInstallDialog();
Aaron Boodman 2012/10/11 02:42:03 Make this protected.
17 17
18 void ShowExtensionInstallDialog(gfx::NativeWindow parent, 18 virtual void ShowExtensionInstallDialog(
19 content::PageNavigator* navigator, 19 gfx::NativeWindow parent,
20 ExtensionInstallPrompt::Delegate* delegate, 20 content::PageNavigator* navigator,
21 const ExtensionInstallPrompt::Prompt& prompt); 21 ExtensionInstallPrompt::Delegate* delegate,
22 const ExtensionInstallPrompt::Prompt& prompt) = 0;
22 23
23 // The implementations of this function are platform-specific. 24 // The implementations of this function are platform-specific.
24 void ShowExtensionInstallDialogImpl( 25 static scoped_refptr<ExtensionInstallDialog> CreateDefaultImpl();
25 gfx::NativeWindow parent, 26
26 content::PageNavigator* navigator, 27 protected:
27 ExtensionInstallPrompt::Delegate* delegate, 28 friend class base::RefCounted<ExtensionInstallDialog>;
28 const ExtensionInstallPrompt::Prompt& prompt); 29 virtual ~ExtensionInstallDialog();
30
31 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallDialog);
32 };
29 33
30 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ 34 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_install_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698