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

Side by Side Diff: ios/chrome/browser/find_in_page/find_tab_helper.h

Issue 2654433007: [ios] Moves find-in-page code out of Tab and into FindTabHelper. (Closed)
Patch Set: Review. Created 3 years, 10 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
OLDNEW
(Empty)
1 // Copyright 2017 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_FIND_IN_PAGE_FIND_TAB_HELPER_H_
6 #define IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_TAB_HELPER_H_
7
8 #include "base/macros.h"
9 #include "ios/web/public/web_state/web_state_observer.h"
10 #import "ios/web/public/web_state/web_state_user_data.h"
11
12 @class FindInPageController;
13 @protocol FindInPageControllerDelegate;
14
15 // Adds support for the "Find in page" feature.
16 class FindTabHelper : public web::WebStateObserver,
17 public web::WebStateUserData<FindTabHelper> {
18 public:
19 // Creates a FindTabHelper and attaches it to the given |web_state|.
20 // |controller_delegate| can be nil.
21 static void CreateForWebState(
22 web::WebState* web_state,
23 id<FindInPageControllerDelegate> controller_delegate);
24
25 // Returns the find in page controller.
26 FindInPageController* GetController();
27
28 private:
29 FindTabHelper(web::WebState* web_state,
30 id<FindInPageControllerDelegate> controller_delegate);
31 ~FindTabHelper() override;
32
33 // web::WebStateObserver.
34 void NavigationItemCommitted(
35 const web::LoadCommittedDetails& load_details) override;
36 void WebStateDestroyed() override;
37
38 // The ObjC find in page controller.
39 FindInPageController* controller_;
40
41 DISALLOW_COPY_AND_ASSIGN(FindTabHelper);
42 };
43
44 #endif // IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/find_in_page/find_in_page_controller.mm ('k') | ios/chrome/browser/find_in_page/find_tab_helper.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698