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_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_PROMPT_TEST_UTILS_H
_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_PROMPT_TEST_UTILS_H
_ |
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_PROMPT_TEST_UTILS_H
_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_PROMPT_TEST_UTILS_H
_ |
7 | 7 |
| 8 #include "base/memory/ref_counted.h" |
8 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
9 | 10 |
10 namespace chrome { | 11 namespace chrome { |
11 | 12 |
12 // A simple delegate implementation that counts the number of times | 13 // A simple delegate implementation that counts the number of times |
13 // |InstallUIProceed| and |InstallUIAbort| are called. | 14 // |InstallUIProceed| and |InstallUIAbort| are called. |
14 class MockExtensionInstallPromptDelegate | 15 class MockExtensionInstallPromptDelegate |
15 : public ExtensionInstallPrompt::Delegate { | 16 : public ExtensionInstallPrompt::Delegate { |
16 public: | 17 public: |
17 MockExtensionInstallPromptDelegate() | 18 MockExtensionInstallPromptDelegate() |
(...skipping 17 matching lines...) Expand all Loading... |
35 const char* extension_dir_name, | 36 const char* extension_dir_name, |
36 const char* manifest_file); | 37 const char* manifest_file); |
37 | 38 |
38 // Loads the default install_prompt test extension. | 39 // Loads the default install_prompt test extension. |
39 scoped_refptr<extensions::Extension> LoadInstallPromptExtension(); | 40 scoped_refptr<extensions::Extension> LoadInstallPromptExtension(); |
40 | 41 |
41 // Loads the icon for the install prompt extension. | 42 // Loads the icon for the install prompt extension. |
42 gfx::Image LoadInstallPromptIcon(); | 43 gfx::Image LoadInstallPromptIcon(); |
43 | 44 |
44 // Builds a prompt using the given extension. | 45 // Builds a prompt using the given extension. |
45 ExtensionInstallPrompt::Prompt BuildExtensionInstallPrompt( | 46 scoped_refptr<ExtensionInstallPrompt::Prompt> BuildExtensionInstallPrompt( |
46 extensions::Extension* extension); | 47 extensions::Extension* extension); |
47 | 48 |
48 ExtensionInstallPrompt::Prompt BuildExtensionPostInstallPermissionsPrompt( | 49 scoped_refptr<ExtensionInstallPrompt::Prompt> |
49 extensions::Extension* extension); | 50 BuildExtensionPostInstallPermissionsPrompt( |
| 51 extensions::Extension* extension); |
50 | 52 |
51 } // namespace chrome | 53 } // namespace chrome |
52 | 54 |
53 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_PROMPT_TEST_UTIL
S_H_ | 55 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_PROMPT_TEST_UTIL
S_H_ |
OLD | NEW |