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

Side by Side Diff: ios/chrome/browser/geolocation/omnibox_geolocation_controller.h

Issue 2585233003: Upstream Chrome on iOS source code [2/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 2013 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_GEOLOCATION_OMNIBOX_GEOLOCATION_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_GEOLOCATION_OMNIBOX_GEOLOCATION_CONTROLLER_H_
7
8 #import <Foundation/Foundation.h>
9
10 #include "ui/base/page_transition_types.h"
11
12 class GURL;
13 @class Tab;
14
15 namespace ios {
16 class ChromeBrowserState;
17 }
18
19 namespace web {
20 class NavigationItem;
21 }
22
23 // Manages using the current device location for omnibox search queries.
24 @interface OmniboxGeolocationController : NSObject
25
26 // Returns singleton object for this class.
27 + (OmniboxGeolocationController*)sharedInstance;
28
29 // Triggers the iOS system prompt to authorize the use of location, if the
30 // authorization is not yet determined.
31 // |newUser| specifies whether this is a new user or an existing user
32 - (void)triggerSystemPromptForNewUser:(BOOL)newUser;
33
34 // Notifies the receiver that the location bar became the first responder.
35 - (void)locationBarDidBecomeFirstResponder:
36 (ios::ChromeBrowserState*)browserState;
37
38 // Notifies the receiver that the location bar stopped being the first
39 // responder.
40 - (void)locationBarDidResignFirstResponder:
41 (ios::ChromeBrowserState*)browserState;
42
43 // Notifies the receiver that the user submitted a URL via the location bar.
44 - (void)locationBarDidSubmitURL:(const GURL&)url
45 transition:(ui::PageTransition)transition
46 browserState:(ios::ChromeBrowserState*)browserState;
47
48 // Adds the current device location to |item| if |item| represents an Omnibox
49 // query that's eligible for location. Returns |YES| if the current device
50 // location was added to |item|; returns |NO| otherwise.
51 - (BOOL)addLocationToNavigationItem:(web::NavigationItem*)item
52 browserState:(ios::ChromeBrowserState*)browserState;
53
54 // Notifies the receiver that the browser finished loading the page for |tab|.
55 // |loadSuccess| whether the tab loaded successfully
56 - (void)finishPageLoadForTab:(Tab*)tab loadSuccess:(BOOL)loadSuccess;
57
58 @end
59
60 #endif // IOS_CHROME_BROWSER_GEOLOCATION_OMNIBOX_GEOLOCATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698