Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 | 183 |
| 184 // Called when a received message cannot be decoded. | 184 // Called when a received message cannot be decoded. |
| 185 virtual void ReceivedBadMessage() = 0; | 185 virtual void ReceivedBadMessage() = 0; |
| 186 | 186 |
| 187 // Track the count of visible widgets. Called by listeners to register and | 187 // Track the count of visible widgets. Called by listeners to register and |
| 188 // unregister visibility. | 188 // unregister visibility. |
| 189 virtual void WidgetRestored() = 0; | 189 virtual void WidgetRestored() = 0; |
| 190 virtual void WidgetHidden() = 0; | 190 virtual void WidgetHidden() = 0; |
| 191 virtual int VisibleWidgetCount() const = 0; | 191 virtual int VisibleWidgetCount() const = 0; |
| 192 | 192 |
| 193 // Track the count of pending views that are being swapped back in. Called | |
| 194 // by listeners to register and unregister pending views to prevent the | |
| 195 // process from exiting. | |
| 196 virtual void AddPendingView() = 0; | |
|
Matt Perry
2011/05/10 01:14:02
since this is an interface on the class already, w
Charlie Reis
2011/05/10 01:33:09
Actually, I'm a little unclear on the difference b
jam
2011/05/10 04:45:18
RenderProcessHost was added so that we can have a
Charlie Reis
2011/05/10 18:42:19
Ok. Since there's no harm in having these counter
| |
| 197 virtual void RemovePendingView() = 0; | |
| 198 | |
| 193 // Try to shutdown the associated renderer process as fast as possible. | 199 // Try to shutdown the associated renderer process as fast as possible. |
| 194 // If this renderer has any RenderViews with unload handlers, then this | 200 // If this renderer has any RenderViews with unload handlers, then this |
| 195 // function does nothing. The current implementation uses TerminateProcess. | 201 // function does nothing. The current implementation uses TerminateProcess. |
| 196 // Returns True if it was able to do fast shutdown. | 202 // Returns True if it was able to do fast shutdown. |
| 197 virtual bool FastShutdownIfPossible() = 0; | 203 virtual bool FastShutdownIfPossible() = 0; |
| 198 | 204 |
| 199 // Synchronously sends the message, waiting for the specified timeout. The | 205 // Synchronously sends the message, waiting for the specified timeout. The |
| 200 // implementor takes ownership of the given Message regardless of whether or | 206 // implementor takes ownership of the given Message regardless of whether or |
| 201 // not this method succeeds. Returns true on success. | 207 // not this method succeeds. Returns true on success. |
| 202 virtual bool SendWithTimeout(IPC::Message* msg, int timeout_ms) = 0; | 208 virtual bool SendWithTimeout(IPC::Message* msg, int timeout_ms) = 0; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 // Factory object for RenderProcessHosts. Using this factory allows tests to | 315 // Factory object for RenderProcessHosts. Using this factory allows tests to |
| 310 // swap out a different one to use a TestRenderProcessHost. | 316 // swap out a different one to use a TestRenderProcessHost. |
| 311 class RenderProcessHostFactory { | 317 class RenderProcessHostFactory { |
| 312 public: | 318 public: |
| 313 virtual ~RenderProcessHostFactory() {} | 319 virtual ~RenderProcessHostFactory() {} |
| 314 virtual RenderProcessHost* CreateRenderProcessHost( | 320 virtual RenderProcessHost* CreateRenderProcessHost( |
| 315 Profile* profile) const = 0; | 321 Profile* profile) const = 0; |
| 316 }; | 322 }; |
| 317 | 323 |
| 318 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ | 324 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |