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_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 namespace base { |
15 class DictionaryValue; | 15 class DictionaryValue; |
16 } | 16 } |
17 | 17 |
18 void ShowExtensionInstallDialog(gfx::NativeWindow parent, | 18 class ExtensionInstallDialog : public base::RefCounted<ExtensionInstallDialog> { |
19 content::PageNavigator* navigator, | 19 public: |
20 ExtensionInstallPrompt::Delegate* delegate, | 20 ExtensionInstallDialog(); |
21 const ExtensionInstallPrompt::Prompt& prompt); | |
22 | 21 |
23 // The implementations of this function are platform-specific. | 22 void ShowExtensionInstallDialog( |
24 void ShowExtensionInstallDialogImpl( | 23 gfx::NativeWindow parent, |
25 gfx::NativeWindow parent, | 24 content::PageNavigator* navigator, |
26 content::PageNavigator* navigator, | 25 ExtensionInstallPrompt::Delegate* delegate, |
27 ExtensionInstallPrompt::Delegate* delegate, | 26 const ExtensionInstallPrompt::Prompt& prompt); |
28 const ExtensionInstallPrompt::Prompt& prompt); | 27 |
| 28 // The implementations of this function are platform-specific. |
| 29 static scoped_refptr<ExtensionInstallDialog> CreateDefaultImpl(); |
| 30 |
| 31 protected: |
| 32 virtual void ShowExtensionInstallDialogImpl( |
| 33 gfx::NativeWindow parent, |
| 34 content::PageNavigator* navigator, |
| 35 ExtensionInstallPrompt::Delegate* delegate, |
| 36 const ExtensionInstallPrompt::Prompt& prompt) = 0; |
| 37 |
| 38 private: |
| 39 friend class base::RefCounted<ExtensionInstallDialog>; |
| 40 virtual ~ExtensionInstallDialog(); |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallDialog); |
| 43 }; |
29 | 44 |
30 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ | 45 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ |
OLD | NEW |