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

Side by Side Diff: content/browser/renderer_host/render_widget_helper.h

Issue 1303773002: Give the main frame a RenderWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plumb through surface ID *and* widget surface ID for window.open Created 5 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
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // corresponding functions in RenderProcessHost. See those declarations 92 // corresponding functions in RenderProcessHost. See those declarations
93 // for documentation. 93 // for documentation.
94 void ResumeDeferredNavigation(const GlobalRequestID& request_id); 94 void ResumeDeferredNavigation(const GlobalRequestID& request_id);
95 95
96 // Called to resume the requests for a view after it's ready. The view was 96 // Called to resume the requests for a view after it's ready. The view was
97 // created by CreateNewWindow which initially blocked the requests. 97 // created by CreateNewWindow which initially blocked the requests.
98 void ResumeRequestsForView(int route_id); 98 void ResumeRequestsForView(int route_id);
99 99
100 // IO THREAD ONLY ----------------------------------------------------------- 100 // IO THREAD ONLY -----------------------------------------------------------
101 101
102 void CreateNewWindow( 102 void CreateNewWindow(const ViewHostMsg_CreateWindow_Params& params,
103 const ViewHostMsg_CreateWindow_Params& params, 103 bool no_javascript_access,
104 bool no_javascript_access, 104 base::ProcessHandle render_process,
105 base::ProcessHandle render_process, 105 int32* route_id,
106 int* route_id, 106 int32* surface_id,
107 int* main_frame_route_id, 107 int32* main_frame_route_id,
108 int* surface_id, 108 int32* main_frame_widget_route_id,
109 SessionStorageNamespace* session_storage_namespace); 109 int32* widget_surface_id,
110 SessionStorageNamespace* session_storage_namespace);
110 void CreateNewWidget(int opener_id, 111 void CreateNewWidget(int opener_id,
111 blink::WebPopupType popup_type, 112 blink::WebPopupType popup_type,
112 int* route_id, 113 int* route_id,
113 int* surface_id); 114 int* surface_id);
114 void CreateNewFullscreenWidget(int opener_id, int* route_id, int* surface_id); 115 void CreateNewFullscreenWidget(int opener_id, int* route_id, int* surface_id);
115 116
116 private: 117 private:
117 friend class base::RefCountedThreadSafe<RenderWidgetHelper>; 118 friend class base::RefCountedThreadSafe<RenderWidgetHelper>;
118 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; 119 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>;
119 friend class base::DeleteHelper<RenderWidgetHelper>; 120 friend class base::DeleteHelper<RenderWidgetHelper>;
120 121
121 ~RenderWidgetHelper(); 122 ~RenderWidgetHelper();
122 123
123 // Called on the UI thread to finish creating a window. 124 // Called on the UI thread to finish creating a window.
124 void OnCreateWindowOnUI( 125 void OnCreateWindowOnUI(const ViewHostMsg_CreateWindow_Params& params,
125 const ViewHostMsg_CreateWindow_Params& params, 126 int32 route_id,
126 int route_id, 127 int32 main_frame_route_id,
127 int main_frame_route_id, 128 int32 main_frame_widget_route_id,
128 SessionStorageNamespace* session_storage_namespace); 129 int32 surface_id,
130 SessionStorageNamespace* session_storage_namespace);
129 131
130 // Called on the IO thread after a window was created on the UI thread. 132 // Called on the IO thread after a window was created on the UI thread.
131 void OnResumeRequestsForView(int route_id); 133 void OnResumeRequestsForView(int route_id);
132 134
133 // Called on the UI thread to finish creating a widget. 135 // Called on the UI thread to finish creating a widget.
134 void OnCreateWidgetOnUI(int32 opener_id, 136 void OnCreateWidgetOnUI(int32 opener_id,
135 int32 route_id, 137 int32 route_id,
136 int32 surface_id, 138 int32 surface_id,
137 blink::WebPopupType popup_type); 139 blink::WebPopupType popup_type);
138 140
(...skipping 16 matching lines...) Expand all
155 base::AtomicSequenceNumber next_routing_id_; 157 base::AtomicSequenceNumber next_routing_id_;
156 158
157 ResourceDispatcherHostImpl* resource_dispatcher_host_; 159 ResourceDispatcherHostImpl* resource_dispatcher_host_;
158 160
159 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); 161 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper);
160 }; 162 };
161 163
162 } // namespace content 164 } // namespace content
163 165
164 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 166 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698