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.
5 #ifndef COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_
6 #define COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_
8 #include "content/public/common/referrer.h"
9 #include "ui/base/page_transition_types.h"
10 #include "ui/base/page_transition_types.h"
13 namespace navigation_interception
{
15 class NavigationParams
{
17 NavigationParams(const GURL
& url
,
18 const content::Referrer
& referrer
,
19 bool has_user_gesture
,
21 ui::PageTransition page_transition_type
,
23 bool is_external_protocol
,
25 NavigationParams(const NavigationParams
& other
);
26 void operator=(const NavigationParams
& rhs
);
28 const GURL
& url() const { return url_
; }
29 GURL
& url() { return url_
; }
30 const content::Referrer
& referrer() const { return referrer_
; }
31 bool has_user_gesture() const { return has_user_gesture_
; }
32 bool is_post() const { return is_post_
; }
33 ui::PageTransition
transition_type() const { return transition_type_
; }
34 bool is_redirect() const { return is_redirect_
; }
35 bool is_external_protocol() const { return is_external_protocol_
; }
36 bool is_main_frame() const { return is_main_frame_
; }
39 void Assign(const NavigationParams
& other
);
42 content::Referrer referrer_
;
43 bool has_user_gesture_
;
45 ui::PageTransition transition_type_
;
47 bool is_external_protocol_
;
51 } // namespace navigation_interception
53 #endif // COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_