Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: content/public/common/child_process_host_delegate.h

Issue 8774040: Don't make classes derive from ChildProcessHost, and instead have them use it through composition... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_DELEGATE_H_
6 #define CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_DELEGATE_H_
7 #pragma once
8
9 #include <string>
10
11 #include "ipc/ipc_channel.h"
12
13 namespace content {
14
15 // Interface that all users of ChildProcessHost need to provide.
16 class ChildProcessHostDelegate : public IPC::Channel::Listener {
17 public:
18 virtual ~ChildProcessHostDelegate() {}
19
20 // Derived classes return true if it's ok to shut down the child process.
21 // Normally they would return true. The exception is if the host is in the
22 // middle of sending a request to the process, in which case the other side
23 // might think it's ok to shutdown, when really it's not.
24 virtual bool CanShutdown() = 0;
25
26 // Notifies the derived class that we told the child process to kill itself.
27 virtual void ShutdownStarted() = 0;
28
29 // Called when the child process unexpected closes the IPC channel. Delegates
30 // would normally delete the object in this case.
31 virtual void OnChildDisconnected() = 0;
32 };
33
34 }; // namespace content
35
36 #endif // CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_DELEGATE_H_
OLDNEW
« content/common/child_process_host.h ('K') | « content/content_common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698