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

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

Issue 2957163002: [Navigation Experiment] Add WKBasedNavigationManagerImpl. (Closed)
Patch Set: Patch for review Created 3 years, 5 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_WEB_STATE_WEB_STATE_IMPL_H_ 5 #ifndef IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ 6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #import "ios/web/navigation/navigation_manager_delegate.h" 20 #import "ios/web/navigation/navigation_manager_delegate.h"
21 #import "ios/web/navigation/navigation_manager_impl.h" 21 #import "ios/web/navigation/navigation_manager_impl.h"
22 #import "ios/web/public/java_script_dialog_callback.h" 22 #import "ios/web/public/java_script_dialog_callback.h"
23 #include "ios/web/public/java_script_dialog_type.h" 23 #include "ios/web/public/java_script_dialog_type.h"
24 #import "ios/web/public/web_state/web_state.h" 24 #import "ios/web/public/web_state/web_state.h"
25 #import "ios/web/public/web_state/web_state_delegate.h" 25 #import "ios/web/public/web_state/web_state_delegate.h"
26 #import "ios/web/web_state/ui/web_view_navigation_proxy_impl.h"
26 #include "url/gurl.h" 27 #include "url/gurl.h"
27 28
28 @class CRWSessionStorage; 29 @class CRWSessionStorage;
29 @class CRWWebController; 30 @class CRWWebController;
30 @protocol CRWWebViewProxy; 31 @protocol CRWWebViewProxy;
31 @class NSURLRequest; 32 @class NSURLRequest;
32 @class NSURLResponse; 33 @class NSURLResponse;
33 34
34 namespace net { 35 namespace net {
35 class HttpResponseHeaders; 36 class HttpResponseHeaders;
36 } 37 }
37 38
38 namespace web { 39 namespace web {
39 40
40 class BrowserState; 41 class BrowserState;
41 struct ContextMenuParams; 42 struct ContextMenuParams;
42 struct FaviconURL; 43 struct FaviconURL;
43 struct LoadCommittedDetails; 44 struct LoadCommittedDetails;
44 class NavigationContext; 45 class NavigationContext;
45 class NavigationManager; 46 class NavigationManager;
46 class SessionCertificatePolicyCacheImpl; 47 class SessionCertificatePolicyCacheImpl;
47 class WebInterstitialImpl; 48 class WebInterstitialImpl;
48 class WebStateInterfaceProvider; 49 class WebStateInterfaceProvider;
49 class WebStatePolicyDecider; 50 class WebStatePolicyDecider;
50 class WebUIIOS; 51 class WebUIIOS;
52 class WebViewNavigationProxy;
51 53
52 // Implementation of WebState. 54 // Implementation of WebState.
53 // Generally mirrors //content's WebContents implementation. 55 // Generally mirrors //content's WebContents implementation.
54 // General notes on expected WebStateImpl ownership patterns: 56 // General notes on expected WebStateImpl ownership patterns:
55 // - Outside of tests, WebStateImpls are created 57 // - Outside of tests, WebStateImpls are created
56 // (a) By @Tab, when creating a new Tab. 58 // (a) By @Tab, when creating a new Tab.
57 // (b) By @SessionWindow, when decoding a saved session. 59 // (b) By @SessionWindow, when decoding a saved session.
58 // (c) By the Copy() method, below, used when marshalling a session 60 // (c) By the Copy() method, below, used when marshalling a session
59 // in preparation for saving. 61 // in preparation for saving.
60 // - WebControllers are the eventual long-term owners of WebStateImpls. 62 // - WebControllers are the eventual long-term owners of WebStateImpls.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 void OnNavigationItemChanged() override; 264 void OnNavigationItemChanged() override;
263 void OnNavigationItemCommitted( 265 void OnNavigationItemCommitted(
264 const LoadCommittedDetails& load_details) override; 266 const LoadCommittedDetails& load_details) override;
265 267
266 // Updates the HTTP response headers for the main page using the headers 268 // Updates the HTTP response headers for the main page using the headers
267 // passed to the OnHttpResponseHeadersReceived() function below. 269 // passed to the OnHttpResponseHeadersReceived() function below.
268 // GetHttpResponseHeaders() can be used to get the headers. 270 // GetHttpResponseHeaders() can be used to get the headers.
269 void UpdateHttpResponseHeaders(const GURL& url); 271 void UpdateHttpResponseHeaders(const GURL& url);
270 272
271 WebState* GetWebState() override; 273 WebState* GetWebState() override;
274 WebViewNavigationProxy* GetWebViewNavigationProxy() const override;
272 275
273 protected: 276 protected:
274 void AddObserver(WebStateObserver* observer) override; 277 void AddObserver(WebStateObserver* observer) override;
275 void RemoveObserver(WebStateObserver* observer) override; 278 void RemoveObserver(WebStateObserver* observer) override;
276 void AddPolicyDecider(WebStatePolicyDecider* decider) override; 279 void AddPolicyDecider(WebStatePolicyDecider* decider) override;
277 void RemovePolicyDecider(WebStatePolicyDecider* decider) override; 280 void RemovePolicyDecider(WebStatePolicyDecider* decider) override;
278 281
279 private: 282 private:
280 // The SessionStorageBuilder functions require access to private variables of 283 // The SessionStorageBuilder functions require access to private variables of
281 // WebStateImpl. 284 // WebStateImpl.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 353
351 // Mojo interface registry for this WebState. 354 // Mojo interface registry for this WebState.
352 std::unique_ptr<WebStateInterfaceProvider> web_state_interface_provider_; 355 std::unique_ptr<WebStateInterfaceProvider> web_state_interface_provider_;
353 356
354 DISALLOW_COPY_AND_ASSIGN(WebStateImpl); 357 DISALLOW_COPY_AND_ASSIGN(WebStateImpl);
355 }; 358 };
356 359
357 } // namespace web 360 } // namespace web
358 361
359 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ 362 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698