forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathheadless_content_utility_client.h
41 lines (29 loc) · 1.24 KB
/
headless_content_utility_client.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright 2017 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 HEADLESS_LIB_HEADLESS_CONTENT_UTILITY_CLIENT_H_
#define HEADLESS_LIB_HEADLESS_CONTENT_UTILITY_CLIENT_H_
#include <string>
#include "base/callback.h"
#include "content/public/utility/content_utility_client.h"
#include "headless/public/headless_export.h"
namespace headless {
class HEADLESS_EXPORT HeadlessContentUtilityClient
: public content::ContentUtilityClient {
public:
using NetworkBinderCreationCallback =
base::RepeatingCallback<void(service_manager::BinderRegistry*)>;
static void SetNetworkBinderCreationCallbackForTests(
NetworkBinderCreationCallback callback);
explicit HeadlessContentUtilityClient(const std::string& user_agent);
~HeadlessContentUtilityClient() override;
// content::ContentUtilityClient:
mojo::ServiceFactory* GetMainThreadServiceFactory() override;
void RegisterNetworkBinders(
service_manager::BinderRegistry* registry) override;
private:
const std::string user_agent_;
DISALLOW_COPY_AND_ASSIGN(HeadlessContentUtilityClient);
};
} // namespace headless
#endif // HEADLESS_LIB_HEADLESS_CONTENT_UTILITY_CLIENT_H_