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

Side by Side Diff: ios/web/public/web_state/web_state.h

Issue 1851003003: [ios] Added web// public API to let embedder observe loading progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 4 years, 8 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 21 matching lines...) Expand all
32 32
33 namespace base { 33 namespace base {
34 class DictionaryValue; 34 class DictionaryValue;
35 } 35 }
36 36
37 namespace web { 37 namespace web {
38 38
39 class BrowserState; 39 class BrowserState;
40 class NavigationManager; 40 class NavigationManager;
41 class WebInterstitial; 41 class WebInterstitial;
42 class WebStateDelegate;
42 class WebStateObserver; 43 class WebStateObserver;
43 class WebStatePolicyDecider; 44 class WebStatePolicyDecider;
44 class WebStateWeakPtrFactory; 45 class WebStateWeakPtrFactory;
45 46
46 // Core interface for interaction with the web. 47 // Core interface for interaction with the web.
47 class WebState : public base::SupportsUserData { 48 class WebState : public base::SupportsUserData {
48 public: 49 public:
49 // Parameters for the OpenURL() method. 50 // Parameters for the OpenURL() method.
50 struct OpenURLParams { 51 struct OpenURLParams {
51 OpenURLParams(const GURL& url, 52 OpenURLParams(const GURL& url,
(...skipping 25 matching lines...) Expand all
77 const std::vector<SkBitmap>&, /* bitmaps */ 78 const std::vector<SkBitmap>&, /* bitmaps */
78 /* The sizes in pixel of the bitmaps before they were resized due to the 79 /* The sizes in pixel of the bitmaps before they were resized due to the
79 max bitmap size passed to DownloadImage(). Each entry in the bitmaps 80 max bitmap size passed to DownloadImage(). Each entry in the bitmaps
80 vector corresponds to an entry in the sizes vector. If a bitmap was 81 vector corresponds to an entry in the sizes vector. If a bitmap was
81 resized, there should be a single returned bitmap. */ 82 resized, there should be a single returned bitmap. */
82 const std::vector<gfx::Size>&)> 83 const std::vector<gfx::Size>&)>
83 ImageDownloadCallback; 84 ImageDownloadCallback;
84 85
85 ~WebState() override {} 86 ~WebState() override {}
86 87
88 // Gets/Sets the delegate.
89 virtual WebStateDelegate* GetDelegate() = 0;
90 virtual void SetDelegate(WebStateDelegate* delegate) = 0;
91
87 // The view containing the contents of the current web page. If the view has 92 // The view containing the contents of the current web page. If the view has
88 // been purged due to low memory, this will recreate it. It is up to the 93 // been purged due to low memory, this will recreate it. It is up to the
89 // caller to size the view. 94 // caller to size the view.
90 virtual UIView* GetView() = 0; 95 virtual UIView* GetView() = 0;
91 96
92 // Gets the BrowserState associated with this WebState. Can never return null. 97 // Gets the BrowserState associated with this WebState. Can never return null.
93 virtual BrowserState* GetBrowserState() const = 0; 98 virtual BrowserState* GetBrowserState() const = 0;
94 99
95 // Opens a URL with the given disposition. The transition specifies how this 100 // Opens a URL with the given disposition. The transition specifies how this
96 // navigation should be recorded in the history system (for example, typed). 101 // navigation should be recorded in the history system (for example, typed).
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 221
217 // Returns a WeakPtr<WebState> to the current WebState. Must remain private 222 // Returns a WeakPtr<WebState> to the current WebState. Must remain private
218 // and only call must be in WebStateWeakPtrFactory. Please consult that class 223 // and only call must be in WebStateWeakPtrFactory. Please consult that class
219 // for more details. Remove as part of http://crbug.com/556736. 224 // for more details. Remove as part of http://crbug.com/556736.
220 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; 225 virtual base::WeakPtr<WebState> AsWeakPtr() = 0;
221 }; 226 };
222 227
223 } // namespace web 228 } // namespace web
224 229
225 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 230 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698