| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_ |
| 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 struct BrowserInfo; | 11 struct BrowserInfo; |
| 12 class ChromeDesktopImpl; | 12 class ChromeDesktopImpl; |
| 13 class Status; | 13 class Status; |
| 14 class WebView; | 14 class WebView; |
| 15 | 15 |
| 16 class Chrome { | 16 class Chrome { |
| 17 public: | 17 public: |
| 18 virtual ~Chrome() {} | 18 virtual ~Chrome() {} |
| 19 | 19 |
| 20 virtual Status GetAsDesktop(ChromeDesktopImpl** desktop) = 0; | 20 virtual Status GetAsDesktop(ChromeDesktopImpl** desktop) = 0; |
| 21 | 21 |
| 22 virtual const BrowserInfo* GetBrowserInfo() const = 0; | 22 virtual const BrowserInfo* GetBrowserInfo() const = 0; |
| 23 | 23 |
| 24 virtual bool HasCrashedWebView() = 0; | 24 virtual bool HasCrashedWebView() = 0; |
| 25 | 25 |
| 26 // Return ids of opened WebViews. The list is not guaranteed to be in the same | 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 | 27 // order as those WebViews are opened, if two or more new windows are opened |
| 28 // between two calls of this method. | 28 // between two calls of this method. |
| 29 virtual Status GetWebViewIds(std::list<std::string>* web_view_ids) = 0; | 29 virtual Status GetWebViewIds(std::list<std::string>* web_view_ids, |
| 30 bool w3c_compliant) = 0; |
| 30 | 31 |
| 31 // Return the WebView for the given id. | 32 // Return the WebView for the given id. |
| 32 virtual Status GetWebViewById(const std::string& id, WebView** web_view) = 0; | 33 virtual Status GetWebViewById(const std::string& id, WebView** web_view) = 0; |
| 33 | 34 |
| 34 // Closes the specified WebView. | 35 // Closes the specified WebView. |
| 35 virtual Status CloseWebView(const std::string& id) = 0; | 36 virtual Status CloseWebView(const std::string& id) = 0; |
| 36 | 37 |
| 37 // Activates the specified WebView. | 38 // Activates the specified WebView. |
| 38 virtual Status ActivateWebView(const std::string& id) = 0; | 39 virtual Status ActivateWebView(const std::string& id) = 0; |
| 39 | 40 |
| 40 // Get the operation system where Chrome is running. | 41 // Get the operation system where Chrome is running. |
| 41 virtual std::string GetOperatingSystemName() = 0; | 42 virtual std::string GetOperatingSystemName() = 0; |
| 42 | 43 |
| 43 // Return whether the mobileEmulation capability has been enabled. | 44 // Return whether the mobileEmulation capability has been enabled. |
| 44 virtual bool IsMobileEmulationEnabled() const = 0; | 45 virtual bool IsMobileEmulationEnabled() const = 0; |
| 45 | 46 |
| 46 // Return whether the target device has a touchscreen, and whether touch | 47 // Return whether the target device has a touchscreen, and whether touch |
| 47 // actions can be performed on it. | 48 // actions can be performed on it. |
| 48 virtual bool HasTouchScreen() const = 0; | 49 virtual bool HasTouchScreen() const = 0; |
| 49 | 50 |
| 50 virtual std::string page_load_strategy() const = 0; | 51 virtual std::string page_load_strategy() const = 0; |
| 51 | 52 |
| 52 virtual void set_page_load_strategy(std::string strategy) = 0; | 53 virtual void set_page_load_strategy(std::string strategy) = 0; |
| 53 | 54 |
| 54 // Quits Chrome. | 55 // Quits Chrome. |
| 55 virtual Status Quit() = 0; | 56 virtual Status Quit() = 0; |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_ | 59 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_H_ |
| OLD | NEW |