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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // listeners own it any more, it will delete itself. | 73 // listeners own it any more, it will delete itself. |
74 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) = 0; | 74 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) = 0; |
75 virtual void RemoveRoute(int32 routing_id) = 0; | 75 virtual void RemoveRoute(int32 routing_id) = 0; |
76 | 76 |
77 // Add and remove observers for lifecycle events. The order in which | 77 // Add and remove observers for lifecycle events. The order in which |
78 // notifications are sent to observers is undefined. Observers must be sure to | 78 // notifications are sent to observers is undefined. Observers must be sure to |
79 // remove the observer before they go away. | 79 // remove the observer before they go away. |
80 virtual void AddObserver(RenderProcessHostObserver* observer) = 0; | 80 virtual void AddObserver(RenderProcessHostObserver* observer) = 0; |
81 virtual void RemoveObserver(RenderProcessHostObserver* observer) = 0; | 81 virtual void RemoveObserver(RenderProcessHostObserver* observer) = 0; |
82 | 82 |
83 // Called to wait for the next UpdateRect message for the specified render | |
84 // widget. Returns true if successful, and the msg out-param will contain a | |
85 // copy of the received UpdateRect message. | |
86 virtual bool WaitForBackingStoreMsg(int render_widget_id, | |
87 const base::TimeDelta& max_delay, | |
88 IPC::Message* msg) = 0; | |
89 | |
90 // Called when a received message cannot be decoded. | 83 // Called when a received message cannot be decoded. |
91 virtual void ReceivedBadMessage() = 0; | 84 virtual void ReceivedBadMessage() = 0; |
92 | 85 |
93 // Track the count of visible widgets. Called by listeners to register and | 86 // Track the count of visible widgets. Called by listeners to register and |
94 // unregister visibility. | 87 // unregister visibility. |
95 virtual void WidgetRestored() = 0; | 88 virtual void WidgetRestored() = 0; |
96 virtual void WidgetHidden() = 0; | 89 virtual void WidgetHidden() = 0; |
97 virtual int VisibleWidgetCount() const = 0; | 90 virtual int VisibleWidgetCount() const = 0; |
98 | 91 |
99 // Indicates whether the current RenderProcessHost is associated with an | 92 // Indicates whether the current RenderProcessHost is associated with an |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 static void SetMaxRendererProcessCount(size_t count); | 280 static void SetMaxRendererProcessCount(size_t count); |
288 | 281 |
289 // Returns the current max number of renderer processes used by the content | 282 // Returns the current max number of renderer processes used by the content |
290 // module. | 283 // module. |
291 static size_t GetMaxRendererProcessCount(); | 284 static size_t GetMaxRendererProcessCount(); |
292 }; | 285 }; |
293 | 286 |
294 } // namespace content. | 287 } // namespace content. |
295 | 288 |
296 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 289 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |