2015-04-30 03:31:17 +00:00
|
|
|
// Copyright (c) 2015 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_
|
|
|
|
#define ELECTRON_SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_
|
2015-04-30 03:31:17 +00:00
|
|
|
|
|
|
|
#include "content/public/utility/content_utility_client.h"
|
|
|
|
|
2020-11-14 00:16:56 +00:00
|
|
|
namespace mojo {
|
2024-07-22 09:31:32 +00:00
|
|
|
class BinderMap;
|
2020-11-14 00:16:56 +00:00
|
|
|
class ServiceFactory;
|
2024-07-22 09:31:32 +00:00
|
|
|
} // namespace mojo
|
2020-11-14 00:16:56 +00:00
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2015-04-30 03:31:17 +00:00
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
class ElectronContentUtilityClient : public content::ContentUtilityClient {
|
2015-04-30 03:31:17 +00:00
|
|
|
public:
|
2020-02-04 20:19:40 +00:00
|
|
|
ElectronContentUtilityClient();
|
|
|
|
~ElectronContentUtilityClient() override;
|
2015-04-30 03:31:17 +00:00
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
ElectronContentUtilityClient(const ElectronContentUtilityClient&) = delete;
|
|
|
|
ElectronContentUtilityClient& operator=(const ElectronContentUtilityClient&) =
|
|
|
|
delete;
|
|
|
|
|
2024-06-20 08:49:07 +00:00
|
|
|
// content::ContentUtilityClient
|
2019-12-11 00:22:35 +00:00
|
|
|
void ExposeInterfacesToBrowser(mojo::BinderMap* binders) override;
|
2020-11-14 00:16:56 +00:00
|
|
|
void RegisterMainThreadServices(mojo::ServiceFactory& services) override;
|
|
|
|
void RegisterIOThreadServices(mojo::ServiceFactory& services) override;
|
2019-01-10 00:10:39 +00:00
|
|
|
|
2015-04-30 03:31:17 +00:00
|
|
|
private:
|
2019-12-11 00:22:35 +00:00
|
|
|
// True if the utility process runs with elevated privileges.
|
2021-01-26 18:16:21 +00:00
|
|
|
bool utility_process_running_elevated_ = false;
|
2015-04-30 03:31:17 +00:00
|
|
|
};
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|
2015-04-30 03:31:17 +00:00
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_
|