1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_IMPL_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_IMPL_H_
11 #include "base/compiler_specific.h"
12 #include "base/memory/linked_ptr.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/scoped_vector.h"
15 #include "chrome/test/chromedriver/chrome/chrome.h"
17 class AutomationExtension;
19 class DevToolsEventListener;
20 class DevToolsHttpClient;
21 class JavaScriptDialogManager;
22 class PortReservation;
27 class ChromeImpl : public Chrome {
29 virtual ~ChromeImpl();
31 // Overridden from Chrome:
32 virtual ChromeDesktopImpl* GetAsDesktop() OVERRIDE;
33 virtual const BrowserInfo* GetBrowserInfo() OVERRIDE;
34 virtual bool HasCrashedWebView() OVERRIDE;
35 virtual Status GetWebViewIds(std::list<std::string>* web_view_ids) OVERRIDE;
36 virtual Status GetWebViewById(const std::string& id,
37 WebView** web_view) OVERRIDE;
38 virtual Status CloseWebView(const std::string& id) OVERRIDE;
39 virtual Status ActivateWebView(const std::string& id) OVERRIDE;
40 virtual Status Quit() OVERRIDE;
44 scoped_ptr<DevToolsHttpClient> client,
45 ScopedVector<DevToolsEventListener>& devtools_event_listeners,
46 scoped_ptr<PortReservation> port_reservation);
48 virtual Status QuitImpl() = 0;
51 scoped_ptr<DevToolsHttpClient> devtools_http_client_;
54 typedef std::list<linked_ptr<WebViewImpl> > WebViewList;
56 // Web views in this list are in the same order as they are opened.
57 WebViewList web_views_;
58 ScopedVector<DevToolsEventListener> devtools_event_listeners_;
59 scoped_ptr<PortReservation> port_reservation_;
62 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_IMPL_H_