| 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_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include <list> |
| 9 |
| 8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 9 #include "base/id_map.h" | 11 #include "base/id_map.h" |
| 10 #include "base/process/kill.h" | 12 #include "base/process/kill.h" |
| 11 #include "base/process/process_handle.h" | 13 #include "base/process/process_handle.h" |
| 12 #include "base/supports_user_data.h" | 14 #include "base/supports_user_data.h" |
| 13 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 14 #include "ipc/ipc_channel_proxy.h" | 16 #include "ipc/ipc_channel_proxy.h" |
| 15 #include "ipc/ipc_sender.h" | 17 #include "ipc/ipc_sender.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 17 | 19 |
| 18 class GURL; | 20 class GURL; |
| 19 struct ViewMsg_SwapOut_Params; | 21 struct ViewMsg_SwapOut_Params; |
| 20 | 22 |
| 21 namespace base { | 23 namespace base { |
| 22 class TimeDelta; | 24 class TimeDelta; |
| 23 } | 25 } |
| 24 | 26 |
| 25 namespace gpu { | 27 namespace gpu { |
| 26 union ValueState; | 28 union ValueState; |
| 27 } | 29 } |
| 28 | 30 |
| 31 namespace media { |
| 32 class AudioOutputController; |
| 33 } |
| 34 |
| 29 namespace content { | 35 namespace content { |
| 30 class BrowserContext; | 36 class BrowserContext; |
| 31 class BrowserMessageFilter; | 37 class BrowserMessageFilter; |
| 32 class RenderProcessHostObserver; | 38 class RenderProcessHostObserver; |
| 33 class RenderWidgetHost; | 39 class RenderWidgetHost; |
| 34 class ServiceRegistry; | 40 class ServiceRegistry; |
| 35 class StoragePartition; | 41 class StoragePartition; |
| 36 struct GlobalRequestID; | 42 struct GlobalRequestID; |
| 37 | 43 |
| 38 // Interface that represents the browser side of the browser <-> renderer | 44 // Interface that represents the browser side of the browser <-> renderer |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 virtual bool SubscribeUniformEnabled() const = 0; | 254 virtual bool SubscribeUniformEnabled() const = 0; |
| 249 | 255 |
| 250 // Handlers for subscription target changes to update subscription_set_ | 256 // Handlers for subscription target changes to update subscription_set_ |
| 251 virtual void OnAddSubscription(unsigned int target) = 0; | 257 virtual void OnAddSubscription(unsigned int target) = 0; |
| 252 virtual void OnRemoveSubscription(unsigned int target) = 0; | 258 virtual void OnRemoveSubscription(unsigned int target) = 0; |
| 253 | 259 |
| 254 // Send a new ValueState to the Gpu Service to update a subscription target | 260 // Send a new ValueState to the Gpu Service to update a subscription target |
| 255 virtual void SendUpdateValueState( | 261 virtual void SendUpdateValueState( |
| 256 unsigned int target, const gpu::ValueState& state) = 0; | 262 unsigned int target, const gpu::ValueState& state) = 0; |
| 257 | 263 |
| 264 // Retrieves the list of AudioOutputController objects associated |
| 265 // with this object and passes it to the callback you specify, on |
| 266 // the same thread on which you called the method. |
| 267 typedef std::list<scoped_refptr<media::AudioOutputController>> |
| 268 AudioOutputControllerList; |
| 269 typedef base::Callback<void(const AudioOutputControllerList&)> |
| 270 GetAudioOutputControllersCallback; |
| 271 virtual void GetAudioOutputControllers( |
| 272 const GetAudioOutputControllersCallback& callback) const = 0; |
| 273 |
| 258 // Static management functions ----------------------------------------------- | 274 // Static management functions ----------------------------------------------- |
| 259 | 275 |
| 260 // Flag to run the renderer in process. This is primarily | 276 // Flag to run the renderer in process. This is primarily |
| 261 // for debugging purposes. When running "in process", the | 277 // for debugging purposes. When running "in process", the |
| 262 // browser maintains a single RenderProcessHost which communicates | 278 // browser maintains a single RenderProcessHost which communicates |
| 263 // to a RenderProcess which is instantiated in the same process | 279 // to a RenderProcess which is instantiated in the same process |
| 264 // with the Browser. All IPC between the Browser and the | 280 // with the Browser. All IPC between the Browser and the |
| 265 // Renderer is the same, it's just not crossing a process boundary. | 281 // Renderer is the same, it's just not crossing a process boundary. |
| 266 | 282 |
| 267 static bool run_renderer_in_process(); | 283 static bool run_renderer_in_process(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 static void SetMaxRendererProcessCount(size_t count); | 322 static void SetMaxRendererProcessCount(size_t count); |
| 307 | 323 |
| 308 // Returns the current maximum number of renderer process hosts kept by the | 324 // Returns the current maximum number of renderer process hosts kept by the |
| 309 // content module. | 325 // content module. |
| 310 static size_t GetMaxRendererProcessCount(); | 326 static size_t GetMaxRendererProcessCount(); |
| 311 }; | 327 }; |
| 312 | 328 |
| 313 } // namespace content. | 329 } // namespace content. |
| 314 | 330 |
| 315 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 331 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |