diff options
Diffstat (limited to 'ceee/ie/common')
-rw-r--r-- | ceee/ie/common/ceee_module_util.cc | 10 | ||||
-rw-r--r-- | ceee/ie/common/ceee_module_util.h | 5 | ||||
-rw-r--r-- | ceee/ie/common/mock_ceee_module_util.h | 6 |
3 files changed, 21 insertions, 0 deletions
diff --git a/ceee/ie/common/ceee_module_util.cc b/ceee/ie/common/ceee_module_util.cc index 930520f..3e18dbc 100644 --- a/ceee/ie/common/ceee_module_util.cc +++ b/ceee/ie/common/ceee_module_util.cc @@ -26,6 +26,8 @@ const wchar_t* kRegistryValueCrxInstalledPath = L"crx_installed_path"; const wchar_t* kRegistryValueCrxInstalledTime = L"crx_installed_time"; const wchar_t* kRegistryValueCrxInstalledByVersion = L"crx_installed_runtime_version"; +const wchar_t* kRegistryValueEnableWebProgressApis = + L"enable_webnav_webreq_apis"; // Global state needed by the BHO and the // toolband, to indicate whether ShowDW calls should affect @@ -244,6 +246,14 @@ bool GetOptionToolbandForceReposition() { return !GetCeeeRegistryBoolean(kRegistryValueToolbandPlaced, false); } +void SetOptionEnableWebProgressApis(bool enable) { + SetCeeeRegistryBoolean(kRegistryValueEnableWebProgressApis, enable); +} + +bool GetOptionEnableWebProgressApis() { + return GetCeeeRegistryBoolean(kRegistryValueEnableWebProgressApis, false); +} + void SetIgnoreShowDWChanges(bool ignore) { if (ignore) { ::InterlockedIncrement(&g_ignore_show_dw_changes); diff --git a/ceee/ie/common/ceee_module_util.h b/ceee/ie/common/ceee_module_util.h index d7f8bf9..bb1291f 100644 --- a/ceee/ie/common/ceee_module_util.h +++ b/ceee/ie/common/ceee_module_util.h @@ -74,6 +74,11 @@ bool GetOptionToolbandIsHidden(); void SetOptionToolbandForceReposition(bool reposition_next_time); bool GetOptionToolbandForceReposition(); +// Stores/reads a registry entry that tracks whether to enable the Web progress +// APIs (webNavigation and webRequest). +void SetOptionEnableWebProgressApis(bool enable); +bool GetOptionEnableWebProgressApis(); + // Indicates whether ShowDW calls should affect registry tracking of the // user's visibility preference. void SetIgnoreShowDWChanges(bool ignore); diff --git a/ceee/ie/common/mock_ceee_module_util.h b/ceee/ie/common/mock_ceee_module_util.h index af70657..80e58b5 100644 --- a/ceee/ie/common/mock_ceee_module_util.h +++ b/ceee/ie/common/mock_ceee_module_util.h @@ -22,6 +22,10 @@ MOCK_STATIC_CLASS_BEGIN(MockCeeeModuleUtils) SetOptionToolbandForceReposition); MOCK_STATIC_INIT2(ceee_module_util::GetOptionToolbandForceReposition, GetOptionToolbandForceReposition); + MOCK_STATIC_INIT2(ceee_module_util::SetOptionEnableWebProgressApis, + SetOptionEnableWebProgressApis); + MOCK_STATIC_INIT2(ceee_module_util::GetOptionEnableWebProgressApis, + GetOptionEnableWebProgressApis); MOCK_STATIC_INIT2(ceee_module_util::SetIgnoreShowDWChanges, SetIgnoreShowDWChanges); MOCK_STATIC_INIT2(ceee_module_util::GetIgnoreShowDWChanges, @@ -33,6 +37,8 @@ MOCK_STATIC_CLASS_BEGIN(MockCeeeModuleUtils) MOCK_STATIC0(bool, , GetOptionToolbandIsHidden); MOCK_STATIC1(void, , SetOptionToolbandForceReposition, bool); MOCK_STATIC0(bool, , GetOptionToolbandForceReposition); + MOCK_STATIC1(void, , SetOptionEnableWebProgressApis, bool); + MOCK_STATIC0(bool, , GetOptionEnableWebProgressApis); MOCK_STATIC1(void, , SetIgnoreShowDWChanges, bool); MOCK_STATIC0(bool, , GetIgnoreShowDWChanges); MOCK_STATIC0(std::wstring, , GetExtensionPath); |