Skip to content

Commit 0e12e8e

Browse files
committed
Moving implementation code of IE driver command handlers from headers
The initial implementation of the IE driver's command handlers put the implementation for each command directly in the header files. While this works, it's not standard practice, and has led to a spaghetti-code of include statements. This takes the first step toward fixing that by moving the implementation of each command into a .cpp file, leaving the header to only contain the class definition.
1 parent 3fb5b65 commit 0e12e8e

File tree

185 files changed

+7237
-4826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+7237
-4826
lines changed

cpp/IEDriverServer.sln

+48-48
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24720.0
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "civetweb", "..\third_party\cpp\civetweb\civetweb.vcxproj", "{231A8BED-6F2D-4688-A3BD-920310621BBF}"
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "civetweb", "..\third_party\cpp\civetweb\civetweb.vcxproj", "{19517B2F-334D-4F39-BEA7-E5D044AD78AF}"
77
EndProject
8-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "json-cpp", "..\third_party\cpp\json-cpp\json-cpp.vcxproj", "{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}"
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "json-cpp", "..\third_party\cpp\json-cpp\json-cpp.vcxproj", "{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}"
99
EndProject
10-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webdriver-server", "webdriver-server\webdriver-server.vcxproj", "{35A23A16-EF17-4CC3-8854-785025A304F3}"
10+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webdriver-server", "webdriver-server\webdriver-server.vcxproj", "{4E509D48-78BF-44FE-84D4-117AFDCD3788}"
1111
EndProject
12-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEDriver", "iedriver\IEDriver.vcxproj", "{BB72383B-427F-4191-B692-E4345A30E33C}"
12+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEDriver", "iedriver\IEDriver.vcxproj", "{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}"
1313
EndProject
14-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEDriverServer", "iedriverserver\IEDriverServer.vcxproj", "{08C3286F-F132-44EC-80F0-2DF30D87A5D3}"
14+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEDriverServer", "IEDriverServer\IEDriverServer.vcxproj", "{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}"
1515
EndProject
1616
Global
1717
GlobalSection(SolutionConfigurationPlatforms) = preSolution
18-
Debug|Win32 = Debug|Win32
1918
Debug|x64 = Debug|x64
20-
Release|Win32 = Release|Win32
19+
Debug|x86 = Debug|x86
2120
Release|x64 = Release|x64
21+
Release|x86 = Release|x86
2222
EndGlobalSection
2323
GlobalSection(ProjectConfigurationPlatforms) = postSolution
24-
{231A8BED-6F2D-4688-A3BD-920310621BBF}.Debug|Win32.ActiveCfg = Debug|Win32
25-
{231A8BED-6F2D-4688-A3BD-920310621BBF}.Debug|Win32.Build.0 = Debug|Win32
26-
{231A8BED-6F2D-4688-A3BD-920310621BBF}.Debug|x64.ActiveCfg = Debug|x64
27-
{231A8BED-6F2D-4688-A3BD-920310621BBF}.Debug|x64.Build.0 = Debug|x64
28-
{231A8BED-6F2D-4688-A3BD-920310621BBF}.Release|Win32.ActiveCfg = Release|Win32
29-
{231A8BED-6F2D-4688-A3BD-920310621BBF}.Release|Win32.Build.0 = Release|Win32
30-
{231A8BED-6F2D-4688-A3BD-920310621BBF}.Release|x64.ActiveCfg = Release|x64
31-
{231A8BED-6F2D-4688-A3BD-920310621BBF}.Release|x64.Build.0 = Release|x64
32-
{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|Win32.ActiveCfg = Debug|Win32
33-
{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|Win32.Build.0 = Debug|Win32
34-
{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|x64.ActiveCfg = Debug|x64
35-
{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|x64.Build.0 = Debug|x64
36-
{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|Win32.ActiveCfg = Release|Win32
37-
{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|Win32.Build.0 = Release|Win32
38-
{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|x64.ActiveCfg = Release|x64
39-
{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|x64.Build.0 = Release|x64
40-
{35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|Win32.ActiveCfg = Debug|Win32
41-
{35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|Win32.Build.0 = Debug|Win32
42-
{35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|x64.ActiveCfg = Debug|x64
43-
{35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|x64.Build.0 = Debug|x64
44-
{35A23A16-EF17-4CC3-8854-785025A304F3}.Release|Win32.ActiveCfg = Release|Win32
45-
{35A23A16-EF17-4CC3-8854-785025A304F3}.Release|Win32.Build.0 = Release|Win32
46-
{35A23A16-EF17-4CC3-8854-785025A304F3}.Release|x64.ActiveCfg = Release|x64
47-
{35A23A16-EF17-4CC3-8854-785025A304F3}.Release|x64.Build.0 = Release|x64
48-
{BB72383B-427F-4191-B692-E4345A30E33C}.Debug|Win32.ActiveCfg = Debug|Win32
49-
{BB72383B-427F-4191-B692-E4345A30E33C}.Debug|Win32.Build.0 = Debug|Win32
50-
{BB72383B-427F-4191-B692-E4345A30E33C}.Debug|x64.ActiveCfg = Debug|x64
51-
{BB72383B-427F-4191-B692-E4345A30E33C}.Debug|x64.Build.0 = Debug|x64
52-
{BB72383B-427F-4191-B692-E4345A30E33C}.Release|Win32.ActiveCfg = Release|Win32
53-
{BB72383B-427F-4191-B692-E4345A30E33C}.Release|Win32.Build.0 = Release|Win32
54-
{BB72383B-427F-4191-B692-E4345A30E33C}.Release|x64.ActiveCfg = Release|x64
55-
{BB72383B-427F-4191-B692-E4345A30E33C}.Release|x64.Build.0 = Release|x64
56-
{08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|Win32.ActiveCfg = Debug|Win32
57-
{08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|Win32.Build.0 = Debug|Win32
58-
{08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|x64.ActiveCfg = Debug|x64
59-
{08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|x64.Build.0 = Debug|x64
60-
{08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|Win32.ActiveCfg = Release|Win32
61-
{08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|Win32.Build.0 = Release|Win32
62-
{08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|x64.ActiveCfg = Release|x64
63-
{08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|x64.Build.0 = Release|x64
24+
{19517B2F-334D-4F39-BEA7-E5D044AD78AF}.Debug|x64.ActiveCfg = Debug|x64
25+
{19517B2F-334D-4F39-BEA7-E5D044AD78AF}.Debug|x64.Build.0 = Debug|x64
26+
{19517B2F-334D-4F39-BEA7-E5D044AD78AF}.Debug|x86.ActiveCfg = Debug|Win32
27+
{19517B2F-334D-4F39-BEA7-E5D044AD78AF}.Debug|x86.Build.0 = Debug|Win32
28+
{19517B2F-334D-4F39-BEA7-E5D044AD78AF}.Release|x64.ActiveCfg = Release|x64
29+
{19517B2F-334D-4F39-BEA7-E5D044AD78AF}.Release|x64.Build.0 = Release|x64
30+
{19517B2F-334D-4F39-BEA7-E5D044AD78AF}.Release|x86.ActiveCfg = Release|Win32
31+
{19517B2F-334D-4F39-BEA7-E5D044AD78AF}.Release|x86.Build.0 = Release|Win32
32+
{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}.Debug|x64.ActiveCfg = Debug|x64
33+
{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}.Debug|x64.Build.0 = Debug|x64
34+
{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}.Debug|x86.ActiveCfg = Debug|Win32
35+
{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}.Debug|x86.Build.0 = Debug|Win32
36+
{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}.Release|x64.ActiveCfg = Release|x64
37+
{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}.Release|x64.Build.0 = Release|x64
38+
{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}.Release|x86.ActiveCfg = Release|Win32
39+
{64EDF9A1-3C2C-489D-AC94-DAD0E55ECA88}.Release|x86.Build.0 = Release|Win32
40+
{4E509D48-78BF-44FE-84D4-117AFDCD3788}.Debug|x64.ActiveCfg = Debug|x64
41+
{4E509D48-78BF-44FE-84D4-117AFDCD3788}.Debug|x64.Build.0 = Debug|x64
42+
{4E509D48-78BF-44FE-84D4-117AFDCD3788}.Debug|x86.ActiveCfg = Debug|Win32
43+
{4E509D48-78BF-44FE-84D4-117AFDCD3788}.Debug|x86.Build.0 = Debug|Win32
44+
{4E509D48-78BF-44FE-84D4-117AFDCD3788}.Release|x64.ActiveCfg = Release|x64
45+
{4E509D48-78BF-44FE-84D4-117AFDCD3788}.Release|x64.Build.0 = Release|x64
46+
{4E509D48-78BF-44FE-84D4-117AFDCD3788}.Release|x86.ActiveCfg = Release|Win32
47+
{4E509D48-78BF-44FE-84D4-117AFDCD3788}.Release|x86.Build.0 = Release|Win32
48+
{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}.Debug|x64.ActiveCfg = Debug|x64
49+
{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}.Debug|x64.Build.0 = Debug|x64
50+
{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}.Debug|x86.ActiveCfg = Debug|Win32
51+
{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}.Debug|x86.Build.0 = Debug|Win32
52+
{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}.Release|x64.ActiveCfg = Release|x64
53+
{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}.Release|x64.Build.0 = Release|x64
54+
{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}.Release|x86.ActiveCfg = Release|Win32
55+
{B6A4F828-E503-4C94-9EBD-0B1E9246E18D}.Release|x86.Build.0 = Release|Win32
56+
{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}.Debug|x64.ActiveCfg = Debug|x64
57+
{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}.Debug|x64.Build.0 = Debug|x64
58+
{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}.Debug|x86.ActiveCfg = Debug|Win32
59+
{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}.Debug|x86.Build.0 = Debug|Win32
60+
{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}.Release|x64.ActiveCfg = Release|x64
61+
{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}.Release|x64.Build.0 = Release|x64
62+
{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}.Release|x86.ActiveCfg = Release|Win32
63+
{5EB3DD9C-9E97-4A4F-A91E-9DED46506E53}.Release|x86.Build.0 = Release|Win32
6464
EndGlobalSection
6565
GlobalSection(SolutionProperties) = preSolution
6666
HideSolutionNode = FALSE

cpp/iedriver/Alert.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
// limitations under the License.
1616

1717
#include "Alert.h"
18+
#include "errorcodes.h"
1819
#include "logging.h"
20+
#include "DocumentHost.h"
21+
#include "StringUtilities.h"
1922

2023
namespace webdriver {
2124

22-
Alert::Alert(BrowserHandle browser, HWND handle) {
25+
Alert::Alert(std::tr1::shared_ptr<DocumentHost> browser, HWND handle) {
2326
LOG(TRACE) << "Entering Alert::Alert";
2427
this->browser_ = browser;
2528
this->alert_handle_ = handle;

cpp/iedriver/Alert.h

+7-5
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717
#ifndef WEBDRIVER_ALERT_H_
1818
#define WEBDRIVER_ALERT_H_
1919

20+
#include <memory>
2021
#include <string>
2122
#include <vector>
22-
#include "DocumentHost.h"
23-
#include "ErrorCodes.h"
2423

2524
#define INVALID_CONTROL_ID -1
2625

2726
namespace webdriver {
2827

28+
// Forward declaration of classes.
29+
class DocumentHost;
30+
2931
class Alert {
3032
public:
31-
Alert(BrowserHandle browser, HWND handle);
33+
Alert(std::tr1::shared_ptr<DocumentHost> browser, HWND handle);
3234
virtual ~Alert(void);
3335

3436
int Accept(void);
@@ -43,7 +45,7 @@ class Alert {
4345

4446
private:
4547
typedef bool (__cdecl *ISBUTTONMATCHPROC)(HWND);
46-
typedef bool (__cdecl *ISEDITMATCHPROC)(HWND);
48+
typedef bool (__cdecl *ISEDITMATCHPROC)(HWND);
4749

4850
struct DialogButtonInfo {
4951
HWND button_handle;
@@ -94,7 +96,7 @@ class Alert {
9496
static BOOL CALLBACK FindTextBoxes(HWND hwnd, LPARAM arg);
9597

9698
HWND alert_handle_;
97-
BrowserHandle browser_;
99+
std::tr1::shared_ptr<DocumentHost> browser_;
98100
bool is_standard_alert_;
99101
bool is_security_alert_;
100102
};

cpp/iedriver/AsyncScriptExecutor.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
// limitations under the License.
1616

1717
#include "AsyncScriptExecutor.h"
18+
1819
#include <vector>
20+
1921
#include "errorcodes.h"
2022
#include "logging.h"
23+
2124
#include "Script.h"
2225

2326
namespace webdriver {

cpp/iedriver/AsyncScriptExecutor.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define WEBDRIVER_IE_ASYNCATOMEXECUTOR_H_
1919

2020
#include <vector>
21+
2122
#include "messages.h"
2223

2324
#define ASYNC_SCRIPT_EVENT_NAME L"WD_ASYNC_SCRIPT_START_EVENT"

cpp/iedriver/Browser.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@
1515
// limitations under the License.
1616

1717
#include "Browser.h"
18-
#include "logging.h"
18+
1919
#include <comutil.h>
2020
#include <ShlGuid.h>
21+
22+
#include "errorcodes.h"
23+
#include "logging.h"
24+
2125
#include "Alert.h"
2226
#include "BrowserFactory.h"
27+
#include "messages.h"
28+
#include "StringUtilities.h"
2329

2430
namespace webdriver {
2531

cpp/iedriver/Browser.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@
1717
#ifndef WEBDRIVER_IE_BROWSER_H_
1818
#define WEBDRIVER_IE_BROWSER_H_
1919

20+
#include <string>
21+
2022
#include <exdispid.h>
21-
#include <exdisp.h>
2223
#include <mshtml.h>
23-
#include <iostream>
24-
#include <string>
24+
2525
#include "DocumentHost.h"
26-
#include "messages.h"
2726

2827
namespace webdriver {
2928

@@ -121,7 +120,6 @@ class Browser : public DocumentHost, public IDispEventSimpleImpl<1, Browser, &DI
121120
bool IsDocumentNavigating(const std::string& page_load_strategy,
122121
IHTMLDocument2* doc);
123122
bool GetDocumentFromWindow(IHTMLWindow2* window, IHTMLDocument2** doc);
124-
//HWND GetTabWindowHandle(void);
125123
void CheckDialogType(HWND dialog_window_handle);
126124

127125
static unsigned int WINAPI GoBackThreadProc(LPVOID param);

cpp/iedriver/BrowserCookie.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
#ifndef WEBDRIVER_IE_BROWSERCOOKIE_H_
1818
#define WEBDRIVER_IE_BROWSERCOOKIE_H_
1919

20+
#include <string>
21+
2022
namespace Json {
2123
class Value;
22-
}
24+
} // namespace Json
2325

2426
namespace webdriver {
2527

26-
class BrowserCookie
27-
{
28+
class BrowserCookie {
2829
public:
2930
BrowserCookie(void);
3031
virtual ~BrowserCookie(void);

cpp/iedriver/BrowserFactory.cpp

+70-4
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,77 @@
1515
// limitations under the License.
1616

1717
#include "BrowserFactory.h"
18+
1819
#include <ctime>
1920
#include <vector>
21+
2022
#include <exdispid.h>
2123
#include <iepmapi.h>
22-
#include <oleacc.h>
24+
#include <psapi.h>
2325
#include <sddl.h>
2426
#include <shlguid.h>
2527
#include <shlobj.h>
26-
#include <WinInet.h>
27-
#include "FileUtilities.h"
28+
2829
#include "logging.h"
29-
#include "psapi.h"
30+
31+
#include "FileUtilities.h"
3032
#include "RegistryUtilities.h"
33+
#include "StringUtilities.h"
34+
35+
#define HTML_GETOBJECT_MSG L"WM_HTML_GETOBJECT"
36+
#define OLEACC_LIBRARY_NAME L"OLEACC.DLL"
37+
#define IEFRAME_LIBRARY_NAME L"ieframe.dll"
38+
#define IELAUNCHURL_FUNCTION_NAME "IELaunchURL"
39+
40+
#define IE_FRAME_WINDOW_CLASS "IEFrame"
41+
#define SHELL_DOCOBJECT_VIEW_WINDOW_CLASS "Shell DocObject View"
42+
#define IE_SERVER_CHILD_WINDOW_CLASS "Internet Explorer_Server"
43+
44+
#define IE_CLSID_REGISTRY_KEY L"SOFTWARE\\Classes\\InternetExplorer.Application\\CLSID"
45+
#define IE_SECURITY_ZONES_REGISTRY_KEY L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones"
46+
#define IE_TABPROCGROWTH_REGISTRY_KEY L"Software\\Microsoft\\Internet Explorer\\Main"
47+
48+
#define IE_PROTECTED_MODE_SETTING_VALUE_NAME L"2500"
49+
50+
#define IELAUNCHURL_ERROR_MESSAGE "IELaunchURL() returned HRESULT %X ('%s') for URL '%s'"
51+
#define CREATEPROCESS_ERROR_MESSAGE "CreateProcess() failed for command line '%s'"
52+
#define NULL_PROCESS_ID_ERROR_MESSAGE " successfully launched Internet Explorer, but did not return a valid process ID."
53+
#define PROTECTED_MODE_SETTING_ERROR_MESSAGE "Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones."
54+
#define ZOOM_SETTING_ERROR_MESSAGE "Browser zoom level was set to %d%%. It should be set to 100%%"
55+
#define ATTACH_TIMEOUT_ERROR_MESSAGE "Could not find an Internet Explorer window belonging to the process with ID %d within %d milliseconds."
56+
#define ATTACH_FAILURE_ERROR_MESSAGE "Found browser window using ShellWindows API, but could not attach to the browser IWebBrowser2 object."
57+
#define CREATEPROCESS_REGISTRY_ERROR_MESSAGE "Unable to use CreateProcess() API. To use CreateProcess() with Internet Explorer 8 or higher, the value of registry setting in HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\TabProcGrowth must be '0'."
58+
59+
#define ZONE_MY_COMPUTER L"0"
60+
#define ZONE_LOCAL_INTRANET L"1"
61+
#define ZONE_TRUSTED_SITES L"2"
62+
#define ZONE_INTERNET L"3"
63+
#define ZONE_RESTRICTED_SITES L"4"
64+
65+
#define IELAUNCHURL_API L"ielaunchurl"
66+
#define CREATEPROCESS_API L"createprocess"
67+
68+
#define RUNDLL_EXE_NAME L"rundll32.exe"
69+
#define INTERNET_CONTROL_PANEL_APPLET_NAME L"inetcpl.cpl"
70+
#define CLEAR_CACHE_COMMAND_LINE_ARGS L"rundll32.exe %s,ClearMyTracksByProcess %u"
71+
// This magic value is the combination of the following bitflags:
72+
// #define CLEAR_HISTORY 0x0001 // Clears history
73+
// #define CLEAR_COOKIES 0x0002 // Clears cookies
74+
// #define CLEAR_CACHE 0x0004 // Clears Temporary Internet Files folder
75+
// #define CLEAR_CACHE_ALL 0x0008 // Clears offline favorites and download history
76+
// #define CLEAR_FORM_DATA 0x0010 // Clears saved form data for form auto-fill-in
77+
// #define CLEAR_PASSWORDS 0x0020 // Clears passwords saved for websites
78+
// #define CLEAR_PHISHING_FILTER 0x0040 // Clears phishing filter data
79+
// #define CLEAR_RECOVERY_DATA 0x0080 // Clears webpage recovery data
80+
// #define CLEAR_PRIVACY_ADVISOR 0x0800 // Clears tracking data
81+
// #define CLEAR_SHOW_NO_GUI 0x0100 // Do not show a GUI when running the cache clearing
82+
//
83+
// Bitflags available but not used in this magic value are as follows:
84+
// #define CLEAR_USE_NO_THREAD 0x0200 // Do not use multithreading for deletion
85+
// #define CLEAR_PRIVATE_CACHE 0x0400 // Valid only when browser is in private browsing mode
86+
// #define CLEAR_DELETE_ALL 0x1000 // Deletes data stored by add-ons
87+
// #define CLEAR_PRESERVE_FAVORITES 0x2000 // Preserves cached data for "favorite" websites
88+
#define CLEAR_CACHE_OPTIONS 0x09FF
3189

3290
namespace webdriver {
3391

@@ -43,6 +101,14 @@ BrowserFactory::~BrowserFactory(void) {
43101
}
44102
}
45103

104+
std::string BrowserFactory::initial_browser_url(void) {
105+
return StringUtilities::ToString(this->initial_browser_url_);
106+
}
107+
108+
std::string BrowserFactory::browser_command_line_switches(void) {
109+
return StringUtilities::ToString(this->browser_command_line_switches_);
110+
}
111+
46112
void BrowserFactory::Initialize(BrowserFactorySettings settings) {
47113
LOG(TRACE) << "Entering BrowserFactory::Initialize";
48114
this->ignore_protected_mode_settings_ = settings.ignore_protected_mode_settings;

0 commit comments

Comments
 (0)