forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavigation_params.h
53 lines (44 loc) · 1.79 KB
/
navigation_params.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_
#define COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_
#include "content/public/common/referrer.h"
#include "ui/base/page_transition_types.h"
#include "ui/base/page_transition_types.h"
#include "url/gurl.h"
namespace navigation_interception {
class NavigationParams {
public:
NavigationParams(const GURL& url,
const content::Referrer& referrer,
bool has_user_gesture,
bool is_post,
ui::PageTransition page_transition_type,
bool is_redirect,
bool is_external_protocol,
bool is_main_frame);
NavigationParams(const NavigationParams& other);
void operator=(const NavigationParams& rhs);
const GURL& url() const { return url_; }
GURL& url() { return url_; }
const content::Referrer& referrer() const { return referrer_; }
bool has_user_gesture() const { return has_user_gesture_; }
bool is_post() const { return is_post_; }
ui::PageTransition transition_type() const { return transition_type_; }
bool is_redirect() const { return is_redirect_; }
bool is_external_protocol() const { return is_external_protocol_; }
bool is_main_frame() const { return is_main_frame_; }
private:
void Assign(const NavigationParams& other);
GURL url_;
content::Referrer referrer_;
bool has_user_gesture_;
bool is_post_;
ui::PageTransition transition_type_;
bool is_redirect_;
bool is_external_protocol_;
bool is_main_frame_;
};
} // namespace navigation_interception
#endif // COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_