summaryrefslogtreecommitdiffstats
path: root/chrome/test/chromedriver/chrome_launcher_impl.h
blob: f8a4cf656485a5ab1b6eb464c3a305e1347b46b0 (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
// Copyright (c) 2012 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 CHROME_TEST_CHROMEDRIVER_CHROME_LAUNCHER_IMPL_H_
#define CHROME_TEST_CHROMEDRIVER_CHROME_LAUNCHER_IMPL_H_

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/test/chromedriver/chrome_launcher.h"
#include "chrome/test/chromedriver/net/sync_websocket_factory.h"

class Chrome;
class Status;
class URLRequestContextGetter;

namespace base {
class FilePath;
}

class ChromeLauncherImpl : public ChromeLauncher {
 public:
  explicit ChromeLauncherImpl(URLRequestContextGetter* context_getter,
                              const SyncWebSocketFactory& socket_factory);
  virtual ~ChromeLauncherImpl();

  // Overridden from ChromeLauncher:
  virtual Status Launch(const base::FilePath& chrome_exe,
                        scoped_ptr<Chrome>* chrome) OVERRIDE;

 private:
  scoped_refptr<URLRequestContextGetter> context_getter_;
  SyncWebSocketFactory socket_factory_;

  DISALLOW_COPY_AND_ASSIGN(ChromeLauncherImpl);
};

#endif  // CHROME_TEST_CHROMEDRIVER_CHROME_LAUNCHER_IMPL_H_