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

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: 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 22 matching lines...) Expand all
33 33
34 namespace base { 34 namespace base {
35 class DictionaryValue; 35 class DictionaryValue;
36 } 36 }
37 37
38 namespace web { 38 namespace web {
39 39
40 class BrowserState; 40 class BrowserState;
41 class NavigationManager; 41 class NavigationManager;
42 class WebInterstitial; 42 class WebInterstitial;
43 class WebStateDelegate;
43 class WebStateObserver; 44 class WebStateObserver;
44 class WebStatePolicyDecider; 45 class WebStatePolicyDecider;
45 class WebStateWeakPtrFactory; 46 class WebStateWeakPtrFactory;
46 47
47 // Core interface for interaction with the web. 48 // Core interface for interaction with the web.
48 class WebState : public base::SupportsUserData { 49 class WebState : public base::SupportsUserData {
49 public: 50 public:
50 // Parameters for the OpenURL() method. 51 // Parameters for the OpenURL() method.
51 struct OpenURLParams { 52 struct OpenURLParams {
52 OpenURLParams(const GURL& url, 53 OpenURLParams(const GURL& url,
(...skipping 25 matching lines...) Expand all
78 const std::vector<SkBitmap>&, /* bitmaps */ 79 const std::vector<SkBitmap>&, /* bitmaps */
79 /* The sizes in pixel of the bitmaps before they were resized due to the 80 /* The sizes in pixel of the bitmaps before they were resized due to the
80 max bitmap size passed to DownloadImage(). Each entry in the bitmaps 81 max bitmap size passed to DownloadImage(). Each entry in the bitmaps
81 vector corresponds to an entry in the sizes vector. If a bitmap was 82 vector corresponds to an entry in the sizes vector. If a bitmap was
82 resized, there should be a single returned bitmap. */ 83 resized, there should be a single returned bitmap. */
83 const std::vector<gfx::Size>&)> 84 const std::vector<gfx::Size>&)>
84 ImageDownloadCallback; 85 ImageDownloadCallback;
85 86
86 ~WebState() override {} 87 ~WebState() override {}
87 88
89 // Gets/Sets the delegate.
90 virtual WebStateDelegate* GetDelegate() = 0;
91 virtual void SetDelegate(WebStateDelegate* delegate) = 0;
92
88 // The view containing the contents of the current web page. If the view has 93 // The view containing the contents of the current web page. If the view has
89 // been purged due to low memory, this will recreate it. It is up to the 94 // been purged due to low memory, this will recreate it. It is up to the
90 // caller to size the view. 95 // caller to size the view.
91 virtual UIView* GetView() = 0; 96 virtual UIView* GetView() = 0;
92 97
93 // Returns the type of the web view associated with this WebState. 98 // Returns the type of the web view associated with this WebState.
94 virtual WebViewType GetWebViewType() const = 0; 99 virtual WebViewType GetWebViewType() const = 0;
95 100
96 // Gets the BrowserState associated with this WebState. Can never return null. 101 // Gets the BrowserState associated with this WebState. Can never return null.
97 virtual BrowserState* GetBrowserState() const = 0; 102 virtual BrowserState* GetBrowserState() const = 0;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 225
221 // Returns a WeakPtr<WebState> to the current WebState. Must remain private 226 // Returns a WeakPtr<WebState> to the current WebState. Must remain private
222 // and only call must be in WebStateWeakPtrFactory. Please consult that class 227 // and only call must be in WebStateWeakPtrFactory. Please consult that class
223 // for more details. Remove as part of http://crbug.com/556736. 228 // for more details. Remove as part of http://crbug.com/556736.
224 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; 229 virtual base::WeakPtr<WebState> AsWeakPtr() = 0;
225 }; 230 };
226 231
227 } // namespace web 232 } // namespace web
228 233
229 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 234 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698