electron/shell/utility/electron_content_utility_client.h

47 lines
1.4 KiB
C
Raw Normal View History

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.
#ifndef SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_
#define SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_
2015-04-30 03:31:17 +00:00
#include <memory>
#include <string>
2015-04-30 03:31:17 +00:00
#include <vector>
#include "base/compiler_specific.h"
#include "content/public/utility/content_utility_client.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "printing/buildflags/buildflags.h"
2015-04-30 03:31:17 +00:00
#if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
#include "chrome/utility/printing_handler.h"
#endif
2015-04-30 03:31:17 +00:00
namespace electron {
2015-04-30 03:31:17 +00:00
class ElectronContentUtilityClient : public content::ContentUtilityClient {
2015-04-30 03:31:17 +00:00
public:
ElectronContentUtilityClient();
~ElectronContentUtilityClient() override;
2015-04-30 03:31:17 +00:00
void ExposeInterfacesToBrowser(mojo::BinderMap* binders) override;
bool OnMessageReceived(const IPC::Message& message) override;
mojo::ServiceFactory* GetMainThreadServiceFactory() override;
mojo::ServiceFactory* GetIOThreadServiceFactory() override;
2015-04-30 03:31:17 +00:00
private:
#if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
std::unique_ptr<printing::PrintingHandler> printing_handler_;
2017-02-01 04:56:34 +00:00
#endif
2015-04-30 03:31:17 +00:00
// True if the utility process runs with elevated privileges.
bool utility_process_running_elevated_;
DISALLOW_COPY_AND_ASSIGN(ElectronContentUtilityClient);
2015-04-30 03:31:17 +00:00
};
} // namespace electron
2015-04-30 03:31:17 +00:00
#endif // SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_