Chromium Code Reviews| Index: chrome/browser/ui/search/instant_controller.cc |
| diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc |
| index 02ba4d3c6a367e313050d415e01b35bf01b8838f..8b44a4234dd46b05fe26f013145ddc0407ba6d69 100644 |
| --- a/chrome/browser/ui/search/instant_controller.cc |
| +++ b/chrome/browser/ui/search/instant_controller.cc |
| @@ -936,12 +936,10 @@ void InstantController::OmniboxFocusChanged( |
| // some actual user action or just because they started typing.) |
| if (extended_enabled_ && GetOverlayContents() && |
|
samarth
2013/05/13 20:56:53
Just need to check extended_enabled_ here. The Get
Donn Denman
2013/05/13 23:44:50
Done.
|
| reason != OMNIBOX_FOCUS_CHANGE_TYPING) { |
| - const bool is_key_capture_enabled = |
| - omnibox_focus_state_ == OMNIBOX_FOCUS_INVISIBLE; |
| if (overlay_) |
| - overlay_->KeyCaptureChanged(is_key_capture_enabled); |
| + overlay_->KeyCaptureChanged(omnibox_focus_state_, reason); |
| if (instant_tab_) |
| - instant_tab_->KeyCaptureChanged(is_key_capture_enabled); |
| + instant_tab_->KeyCaptureChanged(omnibox_focus_state_, reason); |
| } |
| if (state == OMNIBOX_FOCUS_VISIBLE && old_focus_state == OMNIBOX_FOCUS_NONE) { |
| @@ -1161,8 +1159,8 @@ void InstantController::InstantPageRenderViewCreated( |
| // Ensure the searchbox API has the correct initial state. |
| if (IsContentsFrom(overlay(), contents)) { |
| overlay_->SetDisplayInstantResults(instant_enabled_); |
| - overlay_->KeyCaptureChanged( |
| - omnibox_focus_state_ == OMNIBOX_FOCUS_INVISIBLE); |
| + overlay_->KeyCaptureChanged(omnibox_focus_state_, |
| + OMNIBOX_FOCUS_CHANGE_INIT); |
|
samarth
2013/05/13 20:56:53
Don't need a new INIT value. OMNIBOX_FOCUS_CHANGE
samarth
2013/05/13 21:01:10
Actually, we should be saving the reason inside In
Donn Denman
2013/05/13 23:44:50
Done.
Donn Denman
2013/05/13 23:44:50
Done.
|
| overlay_->SetOmniboxBounds(omnibox_bounds_); |
| overlay_->InitializeFonts(); |
| } else if (IsContentsFrom(ntp(), contents)) { |
| @@ -1541,8 +1539,8 @@ void InstantController::UpdateInfoForInstantTab() { |
| instant_tab_->SetOmniboxBounds(omnibox_bounds_); |
| instant_tab_->InitializeFonts(); |
| StartListeningToMostVisitedChanges(); |
| - instant_tab_->KeyCaptureChanged( |
| - omnibox_focus_state_ == OMNIBOX_FOCUS_INVISIBLE); |
| + instant_tab_->KeyCaptureChanged(omnibox_focus_state_, |
| + OMNIBOX_FOCUS_CHANGE_INIT); // TODO(donnd): right reason? |
|
samarth
2013/05/13 21:01:10
Likewise, here.
Donn Denman
2013/05/13 23:44:50
Done.
|
| } |
| } |