| 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_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/observer_list.h" |
| 13 #include "base/process/process.h" | 14 #include "base/process/process.h" |
| 14 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 15 #include "content/browser/child_process_launcher.h" | 16 #include "content/browser/child_process_launcher.h" |
| 16 #include "content/browser/power_monitor_message_broadcaster.h" | 17 #include "content/browser/power_monitor_message_broadcaster.h" |
| 17 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 18 #include "content/public/browser/global_request_id.h" | 19 #include "content/public/browser/global_request_id.h" |
| 19 #include "content/public/browser/gpu_data_manager_observer.h" | 20 #include "content/public/browser/gpu_data_manager_observer.h" |
| 20 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 21 #include "ipc/ipc_channel_proxy.h" | 22 #include "ipc/ipc_channel_proxy.h" |
| 22 #include "ui/surface/transport_dib.h" | 23 #include "ui/surface/transport_dib.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool supports_browser_plugin, | 76 bool supports_browser_plugin, |
| 76 bool is_guest); | 77 bool is_guest); |
| 77 virtual ~RenderProcessHostImpl(); | 78 virtual ~RenderProcessHostImpl(); |
| 78 | 79 |
| 79 // RenderProcessHost implementation (public portion). | 80 // RenderProcessHost implementation (public portion). |
| 80 virtual void EnableSendQueue() OVERRIDE; | 81 virtual void EnableSendQueue() OVERRIDE; |
| 81 virtual bool Init() OVERRIDE; | 82 virtual bool Init() OVERRIDE; |
| 82 virtual int GetNextRoutingID() OVERRIDE; | 83 virtual int GetNextRoutingID() OVERRIDE; |
| 83 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; | 84 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; |
| 84 virtual void RemoveRoute(int32 routing_id) OVERRIDE; | 85 virtual void RemoveRoute(int32 routing_id) OVERRIDE; |
| 86 virtual void AddObserver(RenderProcessHostObserver* observer) OVERRIDE; |
| 87 virtual void RemoveObserver(RenderProcessHostObserver* observer) OVERRIDE; |
| 88 virtual bool HasObserver(RenderProcessHostObserver* observer) OVERRIDE; |
| 85 virtual bool WaitForBackingStoreMsg(int render_widget_id, | 89 virtual bool WaitForBackingStoreMsg(int render_widget_id, |
| 86 const base::TimeDelta& max_delay, | 90 const base::TimeDelta& max_delay, |
| 87 IPC::Message* msg) OVERRIDE; | 91 IPC::Message* msg) OVERRIDE; |
| 88 virtual void ReceivedBadMessage() OVERRIDE; | 92 virtual void ReceivedBadMessage() OVERRIDE; |
| 89 virtual void WidgetRestored() OVERRIDE; | 93 virtual void WidgetRestored() OVERRIDE; |
| 90 virtual void WidgetHidden() OVERRIDE; | 94 virtual void WidgetHidden() OVERRIDE; |
| 91 virtual int VisibleWidgetCount() const OVERRIDE; | 95 virtual int VisibleWidgetCount() const OVERRIDE; |
| 92 virtual bool IsGuest() const OVERRIDE; | 96 virtual bool IsGuest() const OVERRIDE; |
| 93 virtual StoragePartition* GetStoragePartition() const OVERRIDE; | 97 virtual StoragePartition* GetStoragePartition() const OVERRIDE; |
| 94 virtual bool FastShutdownIfPossible() OVERRIDE; | 98 virtual bool FastShutdownIfPossible() OVERRIDE; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 std::queue<IPC::Message*> queued_messages_; | 304 std::queue<IPC::Message*> queued_messages_; |
| 301 | 305 |
| 302 // The globally-unique identifier for this RPH. | 306 // The globally-unique identifier for this RPH. |
| 303 int id_; | 307 int id_; |
| 304 | 308 |
| 305 BrowserContext* browser_context_; | 309 BrowserContext* browser_context_; |
| 306 | 310 |
| 307 // Owned by |browser_context_|. | 311 // Owned by |browser_context_|. |
| 308 StoragePartitionImpl* storage_partition_impl_; | 312 StoragePartitionImpl* storage_partition_impl_; |
| 309 | 313 |
| 314 // The observers watching our lifetime. |
| 315 ObserverList<RenderProcessHostObserver> observers_; |
| 316 |
| 310 // True if the process can be shut down suddenly. If this is true, then we're | 317 // True if the process can be shut down suddenly. If this is true, then we're |
| 311 // sure that all the RenderViews in the process can be shutdown suddenly. If | 318 // sure that all the RenderViews in the process can be shutdown suddenly. If |
| 312 // it's false, then specific RenderViews might still be allowed to be shutdown | 319 // it's false, then specific RenderViews might still be allowed to be shutdown |
| 313 // suddenly by checking their SuddenTerminationAllowed() flag. This can occur | 320 // suddenly by checking their SuddenTerminationAllowed() flag. This can occur |
| 314 // if one WebContents has an unload event listener but another WebContents in | 321 // if one WebContents has an unload event listener but another WebContents in |
| 315 // the same process doesn't. | 322 // the same process doesn't. |
| 316 bool sudden_termination_allowed_; | 323 bool sudden_termination_allowed_; |
| 317 | 324 |
| 318 // Set to true if we shouldn't send input events. We actually do the | 325 // Set to true if we shouldn't send input events. We actually do the |
| 319 // filtering for this at the render widget level. | 326 // filtering for this at the render widget level. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 346 #if defined(OS_ANDROID) | 353 #if defined(OS_ANDROID) |
| 347 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; | 354 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; |
| 348 #endif | 355 #endif |
| 349 | 356 |
| 350 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 357 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 351 }; | 358 }; |
| 352 | 359 |
| 353 } // namespace content | 360 } // namespace content |
| 354 | 361 |
| 355 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 362 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |