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

Side by Side Diff: ios/chrome/browser/ui/omnibox/preload_provider.h

Issue 2589803002: Upstream Chrome on iOS source code [6/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 2012 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_OMNIBOX_PRELOAD_PROVIDER_H_
6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_PRELOAD_PROVIDER_H_
7
8 #import <UIKit/UIKit.h>
9
10 #include "ui/base/page_transition_types.h"
11 #include "url/gurl.h"
12
13 namespace web {
14 struct Referrer;
15 }
16
17 // Protocol for an object that provides preloading capabilities.
18 @protocol PreloadProvider
19
20 // Prerenders the given |url| with the given |transition|. Normally, prerender
21 // requests are fulfilled after a short delay, to prevent unnecessary prerenders
22 // while the user is typing. If |immediately| is YES, this method starts
23 // prerendering immediately, with no delay. |immediately| should be set to YES
24 // only when there is a very high confidence that the user will navigate to the
25 // given |url|.
26 //
27 // If there is already an existing request for |url|, this method does nothing
28 // and does not reset the delay timer. If there is an existing request for a
29 // different URL, this method cancels that request and queues this request
30 // instead.
31 - (void)prerenderURL:(const GURL&)url
32 referrer:(const web::Referrer&)referrer
33 transition:(ui::PageTransition)transition
34 immediately:(BOOL)immediately;
35
36 // Cancels any outstanding prerender requests and destroys any prerendered Tabs.
37 - (void)cancelPrerender;
38
39 // Prefetches the |url|.
40 - (void)prefetchURL:(const GURL&)url transition:(ui::PageTransition)transition;
41
42 // Cancels any outstanding prefetch requests.
43 - (void)cancelPrefetch;
44
45 @end
46
47 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_PRELOAD_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698