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

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

Issue 9317074: Create an API around UtilityProcessHost and use that from chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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
« no previous file with comments | « content/public/browser/utility_process_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/utility_process_host_client.h
===================================================================
--- content/public/browser/utility_process_host_client.h (revision 0)
+++ content/public/browser/utility_process_host_client.h (revision 0)
@@ -0,0 +1,38 @@
+// 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_UTILITY_PROCESS_HOST_CLIENT_H_
+#define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_
+#pragma once
+
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+
+namespace IPC {
+class Message;
+}
+
+namespace content {
+
+// An interface to be implemented by consumers of the utility process to
+// get results back. All functions are called on the thread passed along
+// to UtilityProcessHost.
+class UtilityProcessHostClient
+ : public base::RefCountedThreadSafe<UtilityProcessHostClient> {
+ public:
+ // Called when the process has crashed.
+ virtual void OnProcessCrashed(int exit_code) {}
+
+ // Allow the client to filter IPC messages.
+ virtual bool OnMessageReceived(const IPC::Message& message) = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<UtilityProcessHostClient>;
+
+ virtual ~UtilityProcessHostClient() {}
+};
+
+}; // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_
Property changes on: content\public\browser\utility_process_host_client.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/public/browser/utility_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698