
Removes UtilityProcessHost from content/public and renames UtilityprocessHostImpl to UtilityProcessHost. Now that all use cases of UtilityProcessHost have been replaced by using services (but for the PowerMonitor browser tests), this will prevent further forking of process bypassing the service manager. Bug: 775677 Change-Id: I2107271a54e4ab3141102a5c4fbcce4ea21915dd Reviewed-on: https://chromium-review.googlesource.com/961496 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Commit-Queue: Jay Civelli <jcivelli@chromium.org> Cr-Commit-Position: refs/heads/master@{#543238}
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
// 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_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_
|
|
#define CONTENT_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_
|
|
|
|
#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) {}
|
|
|
|
// Called when the process fails to launch. |error_code| is one of
|
|
// LaunchResultCode or sandbox::ResultCode containing the error.
|
|
virtual void OnProcessLaunchFailed(int error_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_BROWSER_UTILITY_PROCESS_HOST_CLIENT_H_
|