diff options
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_active_document.cc | 15 | ||||
-rw-r--r-- | chrome_frame/chrome_active_document.h | 8 |
2 files changed, 22 insertions, 1 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc index 899ec80..66ee3c0 100644 --- a/chrome_frame/chrome_active_document.cc +++ b/chrome_frame/chrome_active_document.cc @@ -1264,6 +1264,21 @@ LRESULT ChromeActiveDocument::OnFirePrivacyChange(UINT message, WPARAM wparam, return 0; } +LRESULT ChromeActiveDocument::OnShowWindow(UINT message, WPARAM wparam, + LPARAM lparam, + BOOL& handled) { // NO_LINT + if (wparam) + SetFocus(); + return 0; +} + +LRESULT ChromeActiveDocument::OnSetFocus(UINT message, WPARAM wparam, + LPARAM lparam, + BOOL& handled) { // NO_LINT + GiveFocusToChrome(false); + return 0; +} + namespace { struct ModuleAndVersion { const char* module_name_; diff --git a/chrome_frame/chrome_active_document.h b/chrome_frame/chrome_active_document.h index 6bd8e4d..39b0e74 100644 --- a/chrome_frame/chrome_active_document.h +++ b/chrome_frame/chrome_active_document.h @@ -236,6 +236,8 @@ BEGIN_MSG_MAP(ChromeActiveDocument) MESSAGE_HANDLER(WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, OnFirePrivacyChange) COMMAND_ID_HANDLER(IDC_CHROMEFRAME_FORWARD, OnForward) COMMAND_ID_HANDLER(IDC_CHROMEFRAME_BACK, OnBack) + MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) + MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus) CHAIN_MSG_MAP(BaseActiveX) END_MSG_MAP() @@ -340,7 +342,7 @@ END_EXEC_COMMAND_MAP() bool PreProcessContextMenu(HMENU menu); bool HandleContextMenuCommand(UINT cmd, const IPC::ContextMenuParams& params); - // ChromeFramePlugin overrides. + // ChromeFramePlugin overrides. virtual void OnAutomationServerReady(); // IEnumPrivacyRecords @@ -421,6 +423,10 @@ END_EXEC_COMMAND_MAP() LRESULT OnFirePrivacyChange(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); + LRESULT OnShowWindow(UINT message, WPARAM wparam, LPARAM lparam, + BOOL& handled); + LRESULT OnSetFocus(UINT message, WPARAM wparam, LPARAM lparam, + BOOL& handled); // Checks for the presence of known-to-be-buggy BHOs. If we find any // we do not fire the DocumentComplete event to avoid a crash. |