OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // PageNavigator defines an interface that can be used to express the user's | 5 // PageNavigator defines an interface that can be used to express the user's |
6 // intention to navigate to a particular URL. The implementing class should | 6 // intention to navigate to a particular URL. The implementing class should |
7 // perform the navigation. | 7 // perform the navigation. |
8 | 8 |
9 #ifndef CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ | 9 #ifndef CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ |
10 #define CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ | 10 #define CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 GlobalRequestID transferred_global_request_id; | 65 GlobalRequestID transferred_global_request_id; |
66 | 66 |
67 // Indicates whether this navigation should replace the current | 67 // Indicates whether this navigation should replace the current |
68 // navigation entry. | 68 // navigation entry. |
69 bool should_replace_current_entry; | 69 bool should_replace_current_entry; |
70 | 70 |
71 // Indicates whether this navigation was triggered while processing a user | 71 // Indicates whether this navigation was triggered while processing a user |
72 // gesture if the navigation was initiated by the renderer. | 72 // gesture if the navigation was initiated by the renderer. |
73 bool user_gesture; | 73 bool user_gesture; |
74 | 74 |
75 // Indicates whether this navigation will be sent using POST. | |
Charlie Reis
2013/08/02 16:36:41
Again, please make it clear that this only support
Johnny(Jianning) Ding
2013/08/02 23:22:55
Done.
| |
76 bool uses_post; | |
77 | |
78 // The post data when the navigation uses POST. | |
79 // Checking empty status of |post_data| should be enough to indicates whether | |
80 // opening a URL uses POST if sending POST without data is disallowed. | |
81 std::string post_data; | |
joth
2013/08/01 21:16:50
take a look at LoadURLParams in content/public/bro
Charlie Reis
2013/08/02 16:36:41
I agree, this seems like it would be better.
Johnny(Jianning) Ding
2013/08/02 23:22:55
Done.
| |
82 | |
75 private: | 83 private: |
76 OpenURLParams(); | 84 OpenURLParams(); |
77 }; | 85 }; |
78 | 86 |
79 class PageNavigator { | 87 class PageNavigator { |
80 public: | 88 public: |
81 virtual ~PageNavigator() {} | 89 virtual ~PageNavigator() {} |
82 | 90 |
83 // Opens a URL with the given disposition. The transition specifies how this | 91 // Opens a URL with the given disposition. The transition specifies how this |
84 // navigation should be recorded in the history system (for example, typed). | 92 // navigation should be recorded in the history system (for example, typed). |
85 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't | 93 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't |
86 // opened immediately. | 94 // opened immediately. |
87 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; | 95 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; |
88 }; | 96 }; |
89 | 97 |
90 } | 98 } |
91 | 99 |
92 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ | 100 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ |
OLD | NEW |