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

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

Issue 2903883002: Added NavigationContext::IsPost. (Closed)
Patch Set: Self review 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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/web/test/web_int_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_NAVIGATION_CONTEXT_H_ 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_CONTEXT_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_CONTEXT_H_ 6 #define IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_CONTEXT_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include "ui/base/page_transition_types.h" 10 #include "ui/base/page_transition_types.h"
(...skipping 24 matching lines...) Expand all
35 // Returns the page transition type for this navigation. 35 // Returns the page transition type for this navigation.
36 virtual ui::PageTransition GetPageTransition() const = 0; 36 virtual ui::PageTransition GetPageTransition() const = 0;
37 37
38 // Whether the navigation happened within the same document. Examples of same 38 // Whether the navigation happened within the same document. Examples of same
39 // document navigations are: 39 // document navigations are:
40 // * reference fragment navigations 40 // * reference fragment navigations
41 // * pushState/replaceState 41 // * pushState/replaceState
42 // * same document history navigation 42 // * same document history navigation
43 virtual bool IsSameDocument() const = 0; 43 virtual bool IsSameDocument() const = 0;
44 44
45 // Whether the navigation is done using HTTP POST method. This may change
46 // during the navigation (e.g. after encountering a server redirect).
47 //
48 // Note: page and frame navigations can only be done using POST or GET
49 // methods Therefore API exposes only |bool IsPost()| as opposed to
50 // |const std::string& GetMethod()| method.
51 virtual bool IsPost() const = 0;
52
45 // Returns error if the navigation has failed. 53 // Returns error if the navigation has failed.
46 virtual NSError* GetError() const = 0; 54 virtual NSError* GetError() const = 0;
47 55
48 // Returns the response headers for the request, or null if there aren't any 56 // Returns the response headers for the request, or null if there aren't any
49 // response headers or they have not been received yet. The response headers 57 // response headers or they have not been received yet. The response headers
50 // returned should not be modified, as modifications will not be reflected. 58 // returned should not be modified, as modifications will not be reflected.
51 virtual net::HttpResponseHeaders* GetResponseHeaders() const = 0; 59 virtual net::HttpResponseHeaders* GetResponseHeaders() const = 0;
52 60
53 virtual ~NavigationContext() {} 61 virtual ~NavigationContext() {}
54 }; 62 };
55 63
56 } // namespace web 64 } // namespace web
57 65
58 #endif // IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_CONTEXT_H_ 66 #endif // IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | ios/web/test/web_int_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698