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

Unified Diff: chrome/browser/ui/search/instant_page.cc

Issue 12851023: Refactor omnibox focus API into a single method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 months 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/browser/ui/search/instant_page.h ('k') | chrome/browser/ui/search/instant_tab.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_page.cc
diff --git a/chrome/browser/ui/search/instant_page.cc b/chrome/browser/ui/search/instant_page.cc
index 4f10fe8b30ab3444aba03bf92cb0a13552f1a074..0757da208e0c1dc0b30a81238704912264fe5bd8 100644
--- a/chrome/browser/ui/search/instant_page.cc
+++ b/chrome/browser/ui/search/instant_page.cc
@@ -141,14 +141,6 @@ bool InstantPage::ShouldProcessFocusOmnibox() {
return false;
}
-bool InstantPage::ShouldProcessStartCapturingKeyStrokes() {
- return false;
-}
-
-bool InstantPage::ShouldProcessStopCapturingKeyStrokes() {
- return false;
-}
-
bool InstantPage::ShouldProcessNavigateToURL() {
return false;
}
@@ -176,10 +168,6 @@ bool InstantPage::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ShowInstantOverlay,
OnShowInstantOverlay)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusOmnibox, OnFocusOmnibox)
- IPC_MESSAGE_HANDLER(ChromeViewHostMsg_StartCapturingKeyStrokes,
- OnStartCapturingKeyStrokes);
- IPC_MESSAGE_HANDLER(ChromeViewHostMsg_StopCapturingKeyStrokes,
- OnStopCapturingKeyStrokes);
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SearchBoxNavigate,
OnSearchBoxNavigate);
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem,
@@ -243,27 +231,11 @@ void InstantPage::OnShowInstantOverlay(int page_id,
}
}
-void InstantPage::OnFocusOmnibox(int page_id) {
+void InstantPage::OnFocusOmnibox(int page_id, OmniboxFocusState state) {
if (contents()->IsActiveEntry(page_id)) {
OnInstantSupportDetermined(page_id, true);
if (ShouldProcessFocusOmnibox())
- delegate_->FocusOmnibox(contents());
- }
-}
-
-void InstantPage::OnStartCapturingKeyStrokes(int page_id) {
- if (contents()->IsActiveEntry(page_id)) {
- OnInstantSupportDetermined(page_id, true);
- if (ShouldProcessStartCapturingKeyStrokes())
- delegate_->StartCapturingKeyStrokes(contents());
- }
-}
-
-void InstantPage::OnStopCapturingKeyStrokes(int page_id) {
- if (contents()->IsActiveEntry(page_id)) {
- OnInstantSupportDetermined(page_id, true);
- if (ShouldProcessStopCapturingKeyStrokes())
- delegate_->StopCapturingKeyStrokes(contents());
+ delegate_->FocusOmnibox(contents(), state);
}
}
« no previous file with comments | « chrome/browser/ui/search/instant_page.h ('k') | chrome/browser/ui/search/instant_tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698