[email protected] | c0d243a | 2013-01-31 21:20:16 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_ |
| 6 | #define COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_ |
| 7 | |
| 8 | #include "content/public/common/page_transition_types.h" |
| 9 | #include "content/public/common/page_transition_types.h" |
| 10 | #include "content/public/common/referrer.h" |
[email protected] | e3b599e | 2013-07-05 07:15:17 | [diff] [blame] | 11 | #include "url/gurl.h" |
[email protected] | c0d243a | 2013-01-31 21:20:16 | [diff] [blame] | 12 | |
[email protected] | 8812e3d0 | 2013-05-22 12:38:53 | [diff] [blame] | 13 | namespace navigation_interception { |
[email protected] | c0d243a | 2013-01-31 21:20:16 | [diff] [blame] | 14 | |
| 15 | class NavigationParams { |
| 16 | public: |
| 17 | NavigationParams(const GURL& url, |
| 18 | const content::Referrer& referrer, |
| 19 | bool has_user_gesture, |
| 20 | bool is_post, |
| 21 | content::PageTransition page_transition_type, |
| 22 | bool is_redirect); |
| 23 | NavigationParams(const NavigationParams& other); |
| 24 | void operator=(const NavigationParams& rhs); |
| 25 | |
| 26 | const GURL& url() const { return url_; } |
| 27 | GURL& url() { return url_; } |
| 28 | const content::Referrer& referrer() const { return referrer_; } |
| 29 | bool has_user_gesture() const { return has_user_gesture_; } |
| 30 | bool is_post() const { return is_post_; } |
| 31 | content::PageTransition transition_type() const { return transition_type_; } |
| 32 | bool is_redirect() const { return is_redirect_; } |
| 33 | |
| 34 | private: |
[email protected] | 8812e3d0 | 2013-05-22 12:38:53 | [diff] [blame] | 35 | void Assign(const NavigationParams& other); |
| 36 | |
[email protected] | c0d243a | 2013-01-31 21:20:16 | [diff] [blame] | 37 | GURL url_; |
| 38 | content::Referrer referrer_; |
| 39 | bool has_user_gesture_; |
| 40 | bool is_post_; |
| 41 | content::PageTransition transition_type_; |
| 42 | bool is_redirect_; |
[email protected] | c0d243a | 2013-01-31 21:20:16 | [diff] [blame] | 43 | }; |
| 44 | |
[email protected] | 8812e3d0 | 2013-05-22 12:38:53 | [diff] [blame] | 45 | } // namespace navigation_interception |
[email protected] | c0d243a | 2013-01-31 21:20:16 | [diff] [blame] | 46 | |
| 47 | #endif // COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_ |