| 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_;
|
|
|