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

Unified Diff: ios/web/web_state/navigation_context_impl.h

Issue 2835463002: Store NavigationIntext in CRWWKNavigationStates. (Closed)
Patch Set: Fixed compilation. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/web/web_state/navigation_context_impl.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/navigation_context_impl.h
diff --git a/ios/web/web_state/navigation_context_impl.h b/ios/web/web_state/navigation_context_impl.h
index 81ab2d5c73088cf7655e6f0ce211af548332aaa1..5756cedf4a711abf6da402cadb8935a7261eae6d 100644
--- a/ios/web/web_state/navigation_context_impl.h
+++ b/ios/web/web_state/navigation_context_impl.h
@@ -18,28 +18,34 @@ namespace web {
class NavigationContextImpl : public NavigationContext {
public:
// Creates navigation context for sucessful navigation to a different page.
- static std::unique_ptr<NavigationContext> CreateNavigationContext(
+ static std::unique_ptr<NavigationContextImpl> CreateNavigationContext(
WebState* web_state,
const GURL& url,
const scoped_refptr<net::HttpResponseHeaders>& response_headers);
// Creates navigation context for sucessful same page navigation.
- static std::unique_ptr<NavigationContext> CreateSameDocumentNavigationContext(
- WebState* web_state,
- const GURL& url);
+ static std::unique_ptr<NavigationContextImpl>
+ CreateSameDocumentNavigationContext(WebState* web_state, const GURL& url);
// Creates navigation context for the error page navigation.
- static std::unique_ptr<NavigationContext> CreateErrorPageNavigationContext(
+ static std::unique_ptr<NavigationContextImpl>
+ CreateErrorPageNavigationContext(
WebState* web_state,
const GURL& url,
const scoped_refptr<net::HttpResponseHeaders>& response_headers);
+#ifndef NDEBUG
+ // Returns human readable description of this object.
+ NSString* GetDescription() const;
+#endif // NDEBUG
+
// NavigationContext overrides:
WebState* GetWebState() override;
const GURL& GetUrl() const override;
bool IsSameDocument() const override;
bool IsErrorPage() const override;
net::HttpResponseHeaders* GetResponseHeaders() const override;
+ ~NavigationContextImpl() override;
private:
NavigationContextImpl(
@@ -48,7 +54,6 @@ class NavigationContextImpl : public NavigationContext {
bool is_same_page,
bool is_error_page,
const scoped_refptr<net::HttpResponseHeaders>& response_headers);
- ~NavigationContextImpl() override;
WebState* web_state_ = nullptr;
GURL url_;
« no previous file with comments | « no previous file | ios/web/web_state/navigation_context_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698