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

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

Issue 2666193002: Switch RenderViewContextMenu to use RequestOpenURL (Closed)
Patch Set: Address Charlie's comments Created 3 years, 10 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
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 "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/public/browser/global_request_id.h" 16 #include "content/public/browser/global_request_id.h"
17 #include "content/public/browser/site_instance.h" 17 #include "content/public/browser/site_instance.h"
18 #include "content/public/common/child_process_host.h"
18 #include "content/public/common/referrer.h" 19 #include "content/public/common/referrer.h"
19 #include "content/public/common/resource_request_body.h" 20 #include "content/public/common/resource_request_body.h"
21 #include "ipc/ipc_message.h"
20 #include "ui/base/page_transition_types.h" 22 #include "ui/base/page_transition_types.h"
21 #include "ui/base/window_open_disposition.h" 23 #include "ui/base/window_open_disposition.h"
22 #include "url/gurl.h" 24 #include "url/gurl.h"
23 25
24 namespace content { 26 namespace content {
25 27
26 class WebContents; 28 class WebContents;
27 29
28 struct CONTENT_EXPORT OpenURLParams { 30 struct CONTENT_EXPORT OpenURLParams {
29 OpenURLParams(const GURL& url, 31 OpenURLParams(const GURL& url,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 scoped_refptr<ResourceRequestBody> post_data; 66 scoped_refptr<ResourceRequestBody> post_data;
65 67
66 // Extra headers to add to the request for this page. Headers are 68 // Extra headers to add to the request for this page. Headers are
67 // represented as "<name>: <value>" and separated by \r\n. The entire string 69 // represented as "<name>: <value>" and separated by \r\n. The entire string
68 // is terminated by \r\n. May be empty if no extra headers are needed. 70 // is terminated by \r\n. May be empty if no extra headers are needed.
69 std::string extra_headers; 71 std::string extra_headers;
70 72
71 // The browser-global FrameTreeNode ID or -1 to indicate the main frame. 73 // The browser-global FrameTreeNode ID or -1 to indicate the main frame.
72 int frame_tree_node_id; 74 int frame_tree_node_id;
73 75
76 // Routing id of the source RenderFrameHost.
77 int source_render_frame_id = MSG_ROUTING_NONE;
78
79 // Process id of the source RenderFrameHost.
80 int source_render_process_id = ChildProcessHost::kInvalidUniqueID;
81
74 // The disposition requested by the navigation source. 82 // The disposition requested by the navigation source.
75 WindowOpenDisposition disposition; 83 WindowOpenDisposition disposition;
76 84
77 // The transition type of navigation. 85 // The transition type of navigation.
78 ui::PageTransition transition; 86 ui::PageTransition transition;
79 87
80 // Whether this navigation is initiated by the renderer process. 88 // Whether this navigation is initiated by the renderer process.
81 bool is_renderer_initiated; 89 bool is_renderer_initiated;
82 90
83 // Indicates whether this navigation should replace the current 91 // Indicates whether this navigation should replace the current
(...skipping 18 matching lines...) Expand all
102 // Opens a URL with the given disposition. The transition specifies how this 110 // Opens a URL with the given disposition. The transition specifies how this
103 // navigation should be recorded in the history system (for example, typed). 111 // navigation should be recorded in the history system (for example, typed).
104 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't 112 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't
105 // opened immediately. 113 // opened immediately.
106 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; 114 virtual WebContents* OpenURL(const OpenURLParams& params) = 0;
107 }; 115 };
108 116
109 } // namespace content 117 } // namespace content
110 118
111 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ 119 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698