summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_plugin.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 05:35:22 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-19 05:35:22 +0000
commitb95f550fa7ef1723adf93f0292667979be66fa08 (patch)
tree56a6398774c2a24bb65ea7d30d6c6542309fa019 /chrome_frame/chrome_frame_plugin.h
parent552e600db9f51ac1efb0438bd749227226dffa64 (diff)
downloadchromium_src-b95f550fa7ef1723adf93f0292667979be66fa08.zip
chromium_src-b95f550fa7ef1723adf93f0292667979be66fa08.tar.gz
chromium_src-b95f550fa7ef1723adf93f0292667979be66fa08.tar.bz2
Ensure that the renderer has focus when ChromeFrame navigates to a URL in IE full tab mode.
This fixes bug http://code.google.com/p/chromium/issues/detail?id=22745 Test=Covered by unit test. Bug=22745 Review URL: http://codereview.chromium.org/402079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_plugin.h')
-rw-r--r--chrome_frame/chrome_frame_plugin.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/chrome_frame/chrome_frame_plugin.h b/chrome_frame/chrome_frame_plugin.h
index 01ee2e5..36f2fc2 100644
--- a/chrome_frame/chrome_frame_plugin.h
+++ b/chrome_frame/chrome_frame_plugin.h
@@ -122,14 +122,8 @@ END_MSG_MAP()
LRESULT OnSetFocus(UINT message, WPARAM wparam, LPARAM lparam,
BOOL& handled) { // NO_LINT
if (!ignore_setfocus_ && automation_client_ != NULL) {
- TabProxy* tab = automation_client_->tab();
- HWND chrome_window = automation_client_->tab_window();
- if (tab && ::IsWindow(chrome_window)) {
- DLOG(INFO) << "Setting initial focus";
- tab->SetInitialFocus(win_util::IsShiftPressed());
- }
+ GiveFocusToChrome();
}
-
return 0;
}
@@ -190,6 +184,15 @@ END_MSG_MAP()
return new ChromeFrameAutomationClient;
}
+ void GiveFocusToChrome() {
+ TabProxy* tab = automation_client_->tab();
+ HWND chrome_window = automation_client_->tab_window();
+ if (tab && ::IsWindow(chrome_window)) {
+ DLOG(INFO) << "Setting initial focus";
+ tab->SetInitialFocus(win_util::IsShiftPressed());
+ }
+ }
+
protected:
// Our gateway to chrome land
scoped_refptr<ChromeFrameAutomationClient> automation_client_;