Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: content/public/browser/page_navigator.h

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/browser/navigation_entry.h ('k') | content/public/browser/page_navigator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
11 11
12 #include <string> 12 #include <string>
13 13
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/ref_counted_memory.h" 15 #include "base/memory/ref_counted_memory.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/public/browser/global_request_id.h" 17 #include "content/public/browser/global_request_id.h"
18 #include "content/public/common/page_transition_types.h"
19 #include "content/public/common/referrer.h" 18 #include "content/public/common/referrer.h"
19 #include "ui/base/page_transition_types.h"
20 #include "ui/base/window_open_disposition.h" 20 #include "ui/base/window_open_disposition.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 namespace content { 23 namespace content {
24 24
25 class WebContents; 25 class WebContents;
26 26
27 struct CONTENT_EXPORT OpenURLParams { 27 struct CONTENT_EXPORT OpenURLParams {
28 OpenURLParams(const GURL& url, 28 OpenURLParams(const GURL& url,
29 const Referrer& referrer, 29 const Referrer& referrer,
30 WindowOpenDisposition disposition, 30 WindowOpenDisposition disposition,
31 PageTransition transition, 31 ui::PageTransition transition,
32 bool is_renderer_initiated); 32 bool is_renderer_initiated);
33 OpenURLParams(const GURL& url, 33 OpenURLParams(const GURL& url,
34 const Referrer& referrer, 34 const Referrer& referrer,
35 int64 frame_tree_node_id, 35 int64 frame_tree_node_id,
36 WindowOpenDisposition disposition, 36 WindowOpenDisposition disposition,
37 PageTransition transition, 37 ui::PageTransition transition,
38 bool is_renderer_initiated); 38 bool is_renderer_initiated);
39 ~OpenURLParams(); 39 ~OpenURLParams();
40 40
41 // The URL/referrer to be opened. 41 // The URL/referrer to be opened.
42 GURL url; 42 GURL url;
43 Referrer referrer; 43 Referrer referrer;
44 44
45 // Any redirect URLs that occurred for this navigation before |url|. 45 // Any redirect URLs that occurred for this navigation before |url|.
46 std::vector<GURL> redirect_chain; 46 std::vector<GURL> redirect_chain;
47 47
(...skipping 11 matching lines...) Expand all
59 // is terminated by \r\n. May be empty if no extra headers are needed. 59 // is terminated by \r\n. May be empty if no extra headers are needed.
60 std::string extra_headers; 60 std::string extra_headers;
61 61
62 // The browser-global FrameTreeNode ID or -1 to indicate the main frame. 62 // The browser-global FrameTreeNode ID or -1 to indicate the main frame.
63 int64 frame_tree_node_id; 63 int64 frame_tree_node_id;
64 64
65 // The disposition requested by the navigation source. 65 // The disposition requested by the navigation source.
66 WindowOpenDisposition disposition; 66 WindowOpenDisposition disposition;
67 67
68 // The transition type of navigation. 68 // The transition type of navigation.
69 PageTransition transition; 69 ui::PageTransition transition;
70 70
71 // Whether this navigation is initiated by the renderer process. 71 // Whether this navigation is initiated by the renderer process.
72 bool is_renderer_initiated; 72 bool is_renderer_initiated;
73 73
74 // Reference to the old request id in case this is a navigation that is being 74 // Reference to the old request id in case this is a navigation that is being
75 // transferred to a new renderer. 75 // transferred to a new renderer.
76 GlobalRequestID transferred_global_request_id; 76 GlobalRequestID transferred_global_request_id;
77 77
78 // Indicates whether this navigation should replace the current 78 // Indicates whether this navigation should replace the current
79 // navigation entry. 79 // navigation entry.
(...skipping 14 matching lines...) Expand all
94 // Opens a URL with the given disposition. The transition specifies how this 94 // Opens a URL with the given disposition. The transition specifies how this
95 // navigation should be recorded in the history system (for example, typed). 95 // navigation should be recorded in the history system (for example, typed).
96 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't 96 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't
97 // opened immediately. 97 // opened immediately.
98 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; 98 virtual WebContents* OpenURL(const OpenURLParams& params) = 0;
99 }; 99 };
100 100
101 } // namespace content 101 } // namespace content
102 102
103 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ 103 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « content/public/browser/navigation_entry.h ('k') | content/public/browser/page_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698