[Mac] A more robust way to ensure panels avoid key status on window close
[chromium-blink-merge.git] / components / navigation_interception / navigation_params.h
blob0fb10d94e7a896229ac9605a89c9d6aaff76d665
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"
11 #include "url/gurl.h"
13 namespace navigation_interception {
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 ui::PageTransition page_transition_type,
22 bool is_redirect,
23 bool is_external_protocol);
24 NavigationParams(const NavigationParams& other);
25 void operator=(const NavigationParams& rhs);
27 const GURL& url() const { return url_; }
28 GURL& url() { return url_; }
29 const content::Referrer& referrer() const { return referrer_; }
30 bool has_user_gesture() const { return has_user_gesture_; }
31 bool is_post() const { return is_post_; }
32 ui::PageTransition transition_type() const { return transition_type_; }
33 bool is_redirect() const { return is_redirect_; }
34 bool is_external_protocol() const { return is_external_protocol_; }
36 private:
37 void Assign(const NavigationParams& other);
39 GURL url_;
40 content::Referrer referrer_;
41 bool has_user_gesture_;
42 bool is_post_;
43 ui::PageTransition transition_type_;
44 bool is_redirect_;
45 bool is_external_protocol_;
48 } // namespace navigation_interception
50 #endif // COMPONENTS_NAVIGATION_INTERCEPTION_NAVIGATION_PARAMS_H_