| OLD | NEW |
| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( |
| 103 const ViewHostMsg_CreateWindow_Params& params, | 103 const ViewHostMsg_CreateWindow_Params& params, |
| 104 bool no_javascript_access, | 104 bool no_javascript_access, |
| 105 base::ProcessHandle render_process, | 105 base::ProcessHandle render_process, |
| 106 int* route_id, | 106 int* route_id, |
| 107 int* main_frame_route_id, | 107 int* main_frame_route_id, |
| 108 int* surface_id, | |
| 109 SessionStorageNamespace* session_storage_namespace); | 108 SessionStorageNamespace* session_storage_namespace); |
| 110 void CreateNewWidget(int opener_id, | 109 void CreateNewWidget(int opener_id, |
| 111 blink::WebPopupType popup_type, | 110 blink::WebPopupType popup_type, |
| 112 int* route_id, | 111 int* route_id); |
| 113 int* surface_id); | 112 void CreateNewFullscreenWidget(int opener_id, int* route_id); |
| 114 void CreateNewFullscreenWidget(int opener_id, int* route_id, int* surface_id); | |
| 115 | 113 |
| 116 private: | 114 private: |
| 117 friend class base::RefCountedThreadSafe<RenderWidgetHelper>; | 115 friend class base::RefCountedThreadSafe<RenderWidgetHelper>; |
| 118 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; | 116 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; |
| 119 friend class base::DeleteHelper<RenderWidgetHelper>; | 117 friend class base::DeleteHelper<RenderWidgetHelper>; |
| 120 | 118 |
| 121 ~RenderWidgetHelper(); | 119 ~RenderWidgetHelper(); |
| 122 | 120 |
| 123 // Called on the UI thread to finish creating a window. | 121 // Called on the UI thread to finish creating a window. |
| 124 void OnCreateWindowOnUI( | 122 void OnCreateWindowOnUI( |
| 125 const ViewHostMsg_CreateWindow_Params& params, | 123 const ViewHostMsg_CreateWindow_Params& params, |
| 126 int route_id, | 124 int route_id, |
| 127 int main_frame_route_id, | 125 int main_frame_route_id, |
| 128 SessionStorageNamespace* session_storage_namespace); | 126 SessionStorageNamespace* session_storage_namespace); |
| 129 | 127 |
| 130 // Called on the IO thread after a window was created on the UI thread. | 128 // Called on the IO thread after a window was created on the UI thread. |
| 131 void OnResumeRequestsForView(int route_id); | 129 void OnResumeRequestsForView(int route_id); |
| 132 | 130 |
| 133 // Called on the UI thread to finish creating a widget. | 131 // Called on the UI thread to finish creating a widget. |
| 134 void OnCreateWidgetOnUI(int32 opener_id, | 132 void OnCreateWidgetOnUI(int32 opener_id, |
| 135 int32 route_id, | 133 int32 route_id, |
| 136 int32 surface_id, | |
| 137 blink::WebPopupType popup_type); | 134 blink::WebPopupType popup_type); |
| 138 | 135 |
| 139 // Called on the UI thread to create a fullscreen widget. | 136 // Called on the UI thread to create a fullscreen widget. |
| 140 void OnCreateFullscreenWidgetOnUI(int32 opener_id, | 137 void OnCreateFullscreenWidgetOnUI(int32 opener_id, int32 route_id); |
| 141 int32 route_id, | |
| 142 int32 surface_id); | |
| 143 | 138 |
| 144 // Called on the IO thread to resume a paused navigation in the network | 139 // Called on the IO thread to resume a paused navigation in the network |
| 145 // stack without transferring it to a new renderer process. | 140 // stack without transferring it to a new renderer process. |
| 146 void OnResumeDeferredNavigation(const GlobalRequestID& request_id); | 141 void OnResumeDeferredNavigation(const GlobalRequestID& request_id); |
| 147 | 142 |
| 148 // Called on the IO thread to resume a navigation paused immediately after | 143 // Called on the IO thread to resume a navigation paused immediately after |
| 149 // receiving response headers. | 144 // receiving response headers. |
| 150 void OnResumeResponseDeferredAtStart(const GlobalRequestID& request_id); | 145 void OnResumeResponseDeferredAtStart(const GlobalRequestID& request_id); |
| 151 | 146 |
| 152 int render_process_id_; | 147 int render_process_id_; |
| 153 | 148 |
| 154 // The next routing id to use. | 149 // The next routing id to use. |
| 155 base::AtomicSequenceNumber next_routing_id_; | 150 base::AtomicSequenceNumber next_routing_id_; |
| 156 | 151 |
| 157 ResourceDispatcherHostImpl* resource_dispatcher_host_; | 152 ResourceDispatcherHostImpl* resource_dispatcher_host_; |
| 158 | 153 |
| 159 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 154 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
| 160 }; | 155 }; |
| 161 | 156 |
| 162 } // namespace content | 157 } // namespace content |
| 163 | 158 |
| 164 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 159 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
| OLD | NEW |