1 // Copyright 2020 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 IOS_CHROME_BROWSER_UI_COMMANDS_FIND_IN_PAGE_COMMANDS_H_ 6 #define IOS_CHROME_BROWSER_UI_COMMANDS_FIND_IN_PAGE_COMMANDS_H_ 7 8 #import <Foundation/Foundation.h> 9 #import <UIKit/UIKit.h> 10 11 @protocol FindInPageCommands <NSObject> 12 13 // Starts the finding process and shows the Find In Page bar. 14 - (void)openFindInPage; 15 16 // Closes and disables the Find In Page bar. 17 - (void)closeFindInPage; 18 19 // Shows the Find In Page bar if finding is ongoing. 20 - (void)showFindUIIfActive; 21 22 // Closes the Find In Page bar, but does not stop finding. The find bar will 23 // reappear. 24 - (void)hideFindUI; 25 26 // Defocuses the find in page text field. 27 - (void)defocusFindInPage; 28 29 // Search the current tab for the query string in the Find In Page bar. 30 - (void)searchFindInPage; 31 32 // Go to the next location of the Find In Page query string in the current tab. 33 - (void)findNextStringInPage; 34 35 // Go to the previous location of the Find In Page query string in the current 36 // tab. 37 - (void)findPreviousStringInPage; 38 39 @end 40 41 #endif // IOS_CHROME_BROWSER_UI_COMMANDS_FIND_IN_PAGE_COMMANDS_H_ 42