Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6438)

Unified Diff: chrome_frame/chrome_frame_plugin.h

Issue 402079: Ensure that the renderer has focus when ChromeFrame navigates to a URL in IE ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_active_document.cc ('k') | chrome_frame/test/chrome_frame_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_frame_plugin.h
===================================================================
--- chrome_frame/chrome_frame_plugin.h (revision 32473)
+++ chrome_frame/chrome_frame_plugin.h (working copy)
@@ -122,14 +122,8 @@
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 @@
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_;
« no previous file with comments | « chrome_frame/chrome_active_document.cc ('k') | chrome_frame/test/chrome_frame_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698