- add sources.
[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 class ChromeDesktopImpl;
12 class Status;
13 class WebView;
14
15 class Chrome {
16  public:
17   virtual ~Chrome() {}
18
19   virtual ChromeDesktopImpl* GetAsDesktop() = 0;
20
21   virtual std::string GetVersion() = 0;
22
23   virtual int GetBuildNo() = 0;
24
25   virtual bool HasCrashedWebView() = 0;
26
27   // Return ids of opened WebViews in the same order as they are opened.
28   virtual Status GetWebViewIds(std::list<std::string>* web_view_ids) = 0;
29
30   // Return the WebView for the given id.
31   virtual Status GetWebViewById(const std::string& id, WebView** web_view) = 0;
32
33   // Closes the specified WebView.
34   virtual Status CloseWebView(const std::string& id) = 0;
35
36   // Activates the specified WebView.
37   virtual Status ActivateWebView(const std::string& id) = 0;
38
39   // Get the operation system where Chrome is running.
40   virtual std::string GetOperatingSystemName() = 0;
41
42   // Quits Chrome.
43   virtual Status Quit() = 0;
44 };
45
46 #endif  // CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_