summaryrefslogtreecommitdiff
path: root/chromium/webrunner/app/webrunner_main_delegate.h
blob: b81ef80be62fc70cbe3142f73d32bbf4ac99f608 (plain)
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 2018 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 WEBRUNNER_APP_WEBRUNNER_MAIN_DELEGATE_H_
#define WEBRUNNER_APP_WEBRUNNER_MAIN_DELEGATE_H_

#include <memory>

#include "base/macros.h"
#include "content/public/app/content_main_delegate.h"

namespace content {
class ContentClient;
}  // namespace content

namespace webrunner {

class WebRunnerMainDelegate : public content::ContentMainDelegate {
 public:
  WebRunnerMainDelegate();
  ~WebRunnerMainDelegate() override;

  // ContentMainDelegate implementation.
  bool BasicStartupComplete(int* exit_code) override;
  void PreSandboxStartup() override;
  int RunProcess(
      const std::string& process_type,
      const content::MainFunctionParams& main_function_params) override;
  content::ContentBrowserClient* CreateContentBrowserClient() override;

 private:
  std::unique_ptr<content::ContentClient> content_client_;
  std::unique_ptr<content::ContentBrowserClient> browser_client_;

  DISALLOW_COPY_AND_ASSIGN(WebRunnerMainDelegate);
};

}  // namespace webrunner

#endif  // WEBRUNNER_APP_WEBRUNNER_MAIN_DELEGATE_H_