Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / test / chromedriver / chrome / chrome.h
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.
4
5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_
7
8 #include <list>
9 #include <string>
10
11 struct BrowserInfo;
12 class ChromeDesktopImpl;
13 class Status;
14 class WebView;
15
16 class Chrome {
17  public:
18   virtual ~Chrome() {}
19
20   virtual ChromeDesktopImpl* GetAsDesktop() = 0;
21
22   virtual const BrowserInfo* GetBrowserInfo() = 0;
23
24   virtual bool HasCrashedWebView() = 0;
25
26   // Return ids of opened WebViews. The list is not guaranteed to be in the same
27   // order as those WebViews are opened, if two or more new windows are opened
28   // between two calls of this method.
29   virtual Status GetWebViewIds(std::list<std::string>* web_view_ids) = 0;
30
31   // Return the WebView for the given id.
32   virtual Status GetWebViewById(const std::string& id, WebView** web_view) = 0;
33
34   // Closes the specified WebView.
35   virtual Status CloseWebView(const std::string& id) = 0;
36
37   // Activates the specified WebView.
38   virtual Status ActivateWebView(const std::string& id) = 0;
39
40   // Get the operation system where Chrome is running.
41   virtual std::string GetOperatingSystemName() = 0;
42
43   // Quits Chrome.
44   virtual Status Quit() = 0;
45 };
46
47 #endif  // CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_