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 "base/compiler_specific.h"
|
|
|
|
#include "content/public/utility/content_utility_client.h"
|
2019-12-11 00:22:35 +00:00
|
|
|
#include "mojo/public/cpp/bindings/binder_map.h"
|
2018-10-13 01:57:04 +00:00
|
|
|
#include "printing/buildflags/buildflags.h"
|
2015-04-30 03:31:17 +00:00
|
|
|
|
2020-11-14 00:16:56 +00:00
|
|
|
namespace mojo {
|
|
|
|
class ServiceFactory;
|
2021-07-02 00:51:37 +00:00
|
|
|
}
|
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;
|
|
|
|
|
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_
|