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

Unified Diff: content/public/browser/browser_child_process_host_delegate.h

Issue 9150017: Add a Content API around BrowserChildProcessHost, similar to what was done with ChildProcessHost.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix?! Created 8 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/browser_child_process_host_delegate.h
===================================================================
--- content/public/browser/browser_child_process_host_delegate.h (revision 0)
+++ content/public/browser/browser_child_process_host_delegate.h (revision 0)
@@ -0,0 +1,37 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_
+#pragma once
+
+#include "content/common/content_export.h"
+#include "ipc/ipc_channel.h"
+
+namespace content {
+
+// Interface that all users of BrowserChildProcessHost need to provide.
+class CONTENT_EXPORT BrowserChildProcessHostDelegate
+ : public IPC::Channel::Listener {
+ public:
+ virtual ~BrowserChildProcessHostDelegate() {}
+
+ // Delegates return true if it's ok to shut down the child process (which is
+ // the default return value). The exception is if the host is in the middle of
+ // sending a request to the process, in which case the other side might think
+ // it's ok to shutdown, when really it's not.
+ virtual bool CanShutdown();
+
+ // Called when the process has been started.
+ virtual void OnProcessLaunched() {}
+
+ // Called if the process crashed. |exit_code| is the status returned when the
+ // process crashed (for posix, as returned from waitpid(), for Windows, as
+ // returned from GetExitCodeProcess()).
+ virtual void OnProcessCrashed(int exit_code) {}
+};
+
+}; // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_
Property changes on: content\public\browser\browser_child_process_host_delegate.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/public/browser/browser_child_process_host.h ('k') | content/public/browser/browser_child_process_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698