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

Side by Side Diff: content/public/browser/utility_process_host_client.h

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 7 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 unified diff | Download patch
OLDNEW
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_UTILITY_PROCESS_HOST_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 10
11 namespace IPC { 11 namespace IPC {
12 class Message; 12 class Message;
13 } 13 }
14 14
15 namespace content { 15 namespace content {
16 16
17 // An interface to be implemented by consumers of the utility process to 17 // An interface to be implemented by consumers of the utility process to
18 // get results back. All functions are called on the thread passed along 18 // get results back. All functions are called on the thread passed along
19 // to UtilityProcessHost. 19 // to UtilityProcessHost.
20 class UtilityProcessHostClient 20 class UtilityProcessHostClient
21 : public base::RefCountedThreadSafe<UtilityProcessHostClient> { 21 : public base::RefCountedThreadSafe<UtilityProcessHostClient> {
22 public: 22 public:
23 // Called when the process has crashed. 23 // Called when the process has crashed.
24 virtual void OnProcessCrashed(int exit_code) {} 24 virtual void OnProcessCrashed(int exit_code) {}
25 25
26 // Called when the process fails to launch, i.e. it has no exit code. 26 // Called when the process fails to launch. |error_code| is one of
27 virtual void OnProcessLaunchFailed() {} 27 // LaunchResultCode or sandbox::ResultCode containing the error.
28 virtual void OnProcessLaunchFailed(int error_code) {}
28 29
29 // Allow the client to filter IPC messages. 30 // Allow the client to filter IPC messages.
30 virtual bool OnMessageReceived(const IPC::Message& message) = 0; 31 virtual bool OnMessageReceived(const IPC::Message& message) = 0;
31 32
32 protected: 33 protected:
33 friend class base::RefCountedThreadSafe<UtilityProcessHostClient>; 34 friend class base::RefCountedThreadSafe<UtilityProcessHostClient>;
34 35
35 virtual ~UtilityProcessHostClient() {} 36 virtual ~UtilityProcessHostClient() {}
36 }; 37 };
37 38
38 }; // namespace content 39 }; // namespace content
39 40
40 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_ 41 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_
OLDNEW
« no previous file with comments | « content/public/browser/render_process_host_observer.h ('k') | content/public/common/sandbox_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698