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

Side by Side Diff: chrome/browser/ui/search/search_tab_helper.cc

Issue 29943002: Limit display of the virtual keyboard to state changes triggered from a user gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/search/search_tab_helper.h" 5 #include "chrome/browser/ui/search/search_tab_helper.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 break; 438 break;
439 case OMNIBOX_FOCUS_INVISIBLE: 439 case OMNIBOX_FOCUS_INVISIBLE:
440 omnibox->SetFocus(); 440 omnibox->SetFocus();
441 omnibox->model()->SetCaretVisibility(false); 441 omnibox->model()->SetCaretVisibility(false);
442 // If the user clicked on the fakebox, any text already in the omnibox 442 // If the user clicked on the fakebox, any text already in the omnibox
443 // should get cleared when they start typing. Selecting all the existing 443 // should get cleared when they start typing. Selecting all the existing
444 // text is a convenient way to accomplish this. It also gives a slight 444 // text is a convenient way to accomplish this. It also gives a slight
445 // visual cue to users who really understand selection state about what 445 // visual cue to users who really understand selection state about what
446 // will happen if they start typing. 446 // will happen if they start typing.
447 omnibox->SelectAll(false); 447 omnibox->SelectAll(false);
448 omnibox->ShowImeIfNeeded();
448 break; 449 break;
449 case OMNIBOX_FOCUS_NONE: 450 case OMNIBOX_FOCUS_NONE:
450 // Remove focus only if the popup is closed. This will prevent someone 451 // Remove focus only if the popup is closed. This will prevent someone
451 // from changing the omnibox value and closing the popup without user 452 // from changing the omnibox value and closing the popup without user
452 // interaction. 453 // interaction.
453 if (!omnibox->model()->popup_model()->IsOpen()) 454 if (!omnibox->model()->popup_model()->IsOpen())
454 web_contents()->GetView()->Focus(); 455 web_contents()->GetView()->Focus();
455 break; 456 break;
456 } 457 }
457 #endif 458 #endif
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 void SearchTabHelper::RedirectToLocalNTP() { 593 void SearchTabHelper::RedirectToLocalNTP() {
593 // Extra parentheses to declare a variable. 594 // Extra parentheses to declare a variable.
594 content::NavigationController::LoadURLParams load_params( 595 content::NavigationController::LoadURLParams load_params(
595 (GURL(chrome::kChromeSearchLocalNtpUrl))); 596 (GURL(chrome::kChromeSearchLocalNtpUrl)));
596 load_params.referrer = content::Referrer(); 597 load_params.referrer = content::Referrer();
597 load_params.transition_type = content::PAGE_TRANSITION_SERVER_REDIRECT; 598 load_params.transition_type = content::PAGE_TRANSITION_SERVER_REDIRECT;
598 // Don't push a history entry. 599 // Don't push a history entry.
599 load_params.should_replace_current_entry = true; 600 load_params.should_replace_current_entry = true;
600 web_contents_->GetController().LoadURLWithParams(load_params); 601 web_contents_->GetController().LoadURLWithParams(load_params);
601 } 602 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698