| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "base/atomic_sequence_num.h" | 12 #include "base/atomic_sequence_num.h" |
| 13 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/process.h" | 15 #include "base/process.h" |
| 16 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
| 17 #include "base/synchronization/waitable_event.h" | 17 #include "base/synchronization/waitable_event.h" |
| 18 #include "content/public/browser/content_browser_client.h" |
| 18 #include "content/public/common/window_container_type.h" | 19 #include "content/public/common/window_container_type.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| 20 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
| 21 #include "ui/gfx/surface/transport_dib.h" | 22 #include "ui/gfx/surface/transport_dib.h" |
| 22 | 23 |
| 23 namespace IPC { | 24 namespace IPC { |
| 24 class Message; | 25 class Message; |
| 25 } | 26 } |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 #if defined(OS_MACOSX) | 121 #if defined(OS_MACOSX) |
| 121 // Given the id of a transport DIB, return a mapping to it or NULL on error. | 122 // Given the id of a transport DIB, return a mapping to it or NULL on error. |
| 122 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); | 123 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); |
| 123 #endif | 124 #endif |
| 124 | 125 |
| 125 // IO THREAD ONLY ----------------------------------------------------------- | 126 // IO THREAD ONLY ----------------------------------------------------------- |
| 126 | 127 |
| 127 // Called on the IO thread when a UpdateRect message is received. | 128 // Called on the IO thread when a UpdateRect message is received. |
| 128 void DidReceiveUpdateMsg(const IPC::Message& msg); | 129 void DidReceiveUpdateMsg(const IPC::Message& msg); |
| 129 | 130 |
| 130 void CreateNewWindow(const ViewHostMsg_CreateWindow_Params& params, | 131 void CreateNewWindow( |
| 131 base::ProcessHandle render_process, | 132 const ViewHostMsg_CreateWindow_Params& params, |
| 132 int* route_id, | 133 content::ContentBrowserClient::CanCreateWindowResult can_create_result, |
| 133 int* surface_id); | 134 base::ProcessHandle render_process, |
| 135 int* route_id, |
| 136 int* surface_id); |
| 134 void CreateNewWidget(int opener_id, | 137 void CreateNewWidget(int opener_id, |
| 135 WebKit::WebPopupType popup_type, | 138 WebKit::WebPopupType popup_type, |
| 136 int* route_id, | 139 int* route_id, |
| 137 int* surface_id); | 140 int* surface_id); |
| 138 void CreateNewFullscreenWidget(int opener_id, int* route_id, int* surface_id); | 141 void CreateNewFullscreenWidget(int opener_id, int* route_id, int* surface_id); |
| 139 | 142 |
| 140 #if defined(OS_MACOSX) | 143 #if defined(OS_MACOSX) |
| 141 // Called on the IO thread to handle the allocation of a TransportDIB. If | 144 // Called on the IO thread to handle the allocation of a TransportDIB. If |
| 142 // |cache_in_browser| is |true|, then a copy of the shmem is kept by the | 145 // |cache_in_browser| is |true|, then a copy of the shmem is kept by the |
| 143 // browser, and it is the caller's repsonsibility to call | 146 // browser, and it is the caller's repsonsibility to call |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 217 |
| 215 // The next routing id to use. | 218 // The next routing id to use. |
| 216 base::AtomicSequenceNumber next_routing_id_; | 219 base::AtomicSequenceNumber next_routing_id_; |
| 217 | 220 |
| 218 content::ResourceDispatcherHostImpl* resource_dispatcher_host_; | 221 content::ResourceDispatcherHostImpl* resource_dispatcher_host_; |
| 219 | 222 |
| 220 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 223 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
| 221 }; | 224 }; |
| 222 | 225 |
| 223 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 226 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
| OLD | NEW |