summaryrefslogtreecommitdiffstats
path: root/blimp/engine/browser/blimp_browser_main_parts.h
blob: 803ac79ad3bbf08140396c9164442daecadc723f (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
42
43
44
45
46
47
48
49
50
51
// Copyright 2015 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 BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_MAIN_PARTS_H_
#define BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_MAIN_PARTS_H_

#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/browser_main_parts.h"
#include "content/public/common/main_function_params.h"

namespace net {
class NetLog;
}

namespace content {
struct MainFunctionParams;
}

namespace blimp {
namespace engine {

class BlimpBrowserContext;
class BlimpEngineConfig;
class BlimpEngineSession;

class BlimpBrowserMainParts : public content::BrowserMainParts {
 public:
  explicit BlimpBrowserMainParts(const content::MainFunctionParams& parameters);
  ~BlimpBrowserMainParts() override;

  // content::BrowserMainParts implementation.
  void PreEarlyInitialization() override;
  void PreMainMessageLoopRun() override;
  void PostMainMessageLoopRun() override;

  BlimpBrowserContext* GetBrowserContext();

 private:
  scoped_ptr<BlimpEngineConfig> engine_config_;
  scoped_ptr<net::NetLog> net_log_;
  scoped_ptr<BlimpEngineSession> engine_session_;

  DISALLOW_COPY_AND_ASSIGN(BlimpBrowserMainParts);
};

}  // namespace engine
}  // namespace blimp

#endif  // BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_MAIN_PARTS_H_