OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 IOS_CHROME_TEST_APP_CHROME_TEST_UTIL_H_ | 5 #ifndef IOS_CHROME_TEST_APP_CHROME_TEST_UTIL_H_ |
6 #define IOS_CHROME_TEST_APP_CHROME_TEST_UTIL_H_ | 6 #define IOS_CHROME_TEST_APP_CHROME_TEST_UTIL_H_ |
7 | 7 |
8 #import "base/ios/block_types.h" | 8 #import "base/ios/block_types.h" |
| 9 #import "ios/chrome/browser/ui/commands/browser_commands.h" |
9 #import "ios/web/public/web_state/web_state.h" | 10 #import "ios/web/public/web_state/web_state.h" |
10 | 11 |
11 namespace ios { | 12 namespace ios { |
12 class ChromeBrowserState; | 13 class ChromeBrowserState; |
13 } | 14 } |
14 | 15 |
15 @class DeviceSharingManager; | 16 @class DeviceSharingManager; |
16 @class GenericChromeCommand; | 17 @class GenericChromeCommand; |
17 @class MainController; | 18 @class MainController; |
18 @class NewTabPageController; | 19 @class NewTabPageController; |
(...skipping 15 matching lines...) Expand all Loading... |
34 | 35 |
35 // Returns the current, non-incognito ChromeBrowserState. | 36 // Returns the current, non-incognito ChromeBrowserState. |
36 ios::ChromeBrowserState* GetOriginalBrowserState(); | 37 ios::ChromeBrowserState* GetOriginalBrowserState(); |
37 | 38 |
38 // Returns the current incognito ChromeBrowserState | 39 // Returns the current incognito ChromeBrowserState |
39 ios::ChromeBrowserState* GetCurrentIncognitoBrowserState(); | 40 ios::ChromeBrowserState* GetCurrentIncognitoBrowserState(); |
40 | 41 |
41 // Returns the number of key commands currently registered with the main BVC. | 42 // Returns the number of key commands currently registered with the main BVC. |
42 NSUInteger GetRegisteredKeyCommandsCount(); | 43 NSUInteger GetRegisteredKeyCommandsCount(); |
43 | 44 |
| 45 // Returns the dispatcher for the main BVC. |
| 46 id<BrowserCommands> BrowserCommandDispatcherForMainBVC(); |
| 47 |
44 // Runs |command| using the active view controller. | 48 // Runs |command| using the active view controller. |
45 void RunCommandWithActiveViewController(GenericChromeCommand* command); | 49 void RunCommandWithActiveViewController(GenericChromeCommand* command); |
46 | 50 |
47 // Removes all presented infobars. | 51 // Removes all presented infobars. |
48 void RemoveAllInfoBars(); | 52 void RemoveAllInfoBars(); |
49 | 53 |
50 // Dismisses all presented views and modal dialogs. | 54 // Dismisses all presented views and modal dialogs. |
51 void ClearPresentedState(); | 55 void ClearPresentedState(); |
52 | 56 |
53 // Purges and recreates all web views. | 57 // Purges and recreates all web views. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 89 |
86 // Waits for Breakpad to process the queued updates. | 90 // Waits for Breakpad to process the queued updates. |
87 void WaitForBreakpadQueue(); | 91 void WaitForBreakpadQueue(); |
88 | 92 |
89 // Simulates launching Chrome from another application. | 93 // Simulates launching Chrome from another application. |
90 void OpenChromeFromExternalApp(const GURL& url); | 94 void OpenChromeFromExternalApp(const GURL& url); |
91 | 95 |
92 } // namespace chrome_test_util | 96 } // namespace chrome_test_util |
93 | 97 |
94 #endif // IOS_CHROME_TEST_APP_CHROME_TEST_UTIL_H_ | 98 #endif // IOS_CHROME_TEST_APP_CHROME_TEST_UTIL_H_ |
OLD | NEW |