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

Side by Side Diff: ios/chrome/browser/ui/contextual_search/contextual_search_web_state_observer.h

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (Closed)
Patch Set: Created 4 years 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 2016 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_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_WEB_STATE_OBSE RVER_H_
6 #define IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_WEB_STATE_OBSE RVER_H_
7
8 #import <UIKit/UIKit.h>
9
10 #include "ios/web/public/web_state/web_state_observer.h"
11
12 @protocol ContextualSearchWebStateDelegate<NSObject>
13 @optional
14 - (void)webState:(web::WebState*)webState
15 navigatedWithDetails:(const web::LoadCommittedDetails&)details;
16 - (void)webState:(web::WebState*)webState
17 pageLoadedWithStatus:(web::PageLoadCompletionStatus)loadStatus;
18 - (void)webStateDestroyed:(web::WebState*)webState;
19
20 @end
21
22 class ContextualSearchWebStateObserver : public web::WebStateObserver {
23 public:
24 ContextualSearchWebStateObserver(
25 id<ContextualSearchWebStateDelegate> delegate);
26 ~ContextualSearchWebStateObserver() override;
27
28 void ObserveWebState(web::WebState* web_state);
29
30 private:
31 void NavigationItemCommitted(
32 const web::LoadCommittedDetails& load_details) override;
33 void PageLoaded(
34 web::PageLoadCompletionStatus load_completion_status) override;
35 void WebStateDestroyed() override;
36
37 id<ContextualSearchWebStateDelegate> delegate_;
38 bool loaded_;
39 };
40
41 #endif // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_WEB_STATE_O BSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698