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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 10732002: Upstream rewrite of Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extreme nits. Created 8 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/views/omnibox/omnibox_view_views.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/property_bag.h" 8 #include "base/property_bag.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 void OmniboxViewViews::HandleFocusOut() { 414 void OmniboxViewViews::HandleFocusOut() {
415 gfx::NativeView native_view = NULL; 415 gfx::NativeView native_view = NULL;
416 #if defined(USE_AURA) 416 #if defined(USE_AURA)
417 views::Widget* widget = GetWidget(); 417 views::Widget* widget = GetWidget();
418 if (widget) { 418 if (widget) {
419 aura::RootWindow* root = widget->GetNativeView()->GetRootWindow(); 419 aura::RootWindow* root = widget->GetNativeView()->GetRootWindow();
420 if (root) 420 if (root)
421 native_view = root->GetFocusManager()->GetFocusedWindow(); 421 native_view = root->GetFocusManager()->GetFocusedWindow();
422 } 422 }
423 #endif 423 #endif
424 model_->OnWillKillFocus(native_view); 424 model_->OnWillKillFocus();
425 // Close the popup. 425 // Close the popup.
426 ClosePopup(); 426 ClosePopup();
427 // Tell the model to reset itself. 427 // Tell the model to reset itself.
428 model_->OnKillFocus(); 428 model_->OnKillFocus();
429 controller_->OnKillFocus(); 429 controller_->OnKillFocus();
430 } 430 }
431 431
432 void OmniboxViewViews::SetLocationEntryFocusable(bool focusable) { 432 void OmniboxViewViews::SetLocationEntryFocusable(bool focusable) {
433 textfield_->set_focusable(focusable); 433 textfield_->set_focusable(focusable);
434 } 434 }
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 const ui::Range& range) { 956 const ui::Range& range) {
957 if (text != GetText()) 957 if (text != GetText())
958 textfield_->SetText(text); 958 textfield_->SetText(text);
959 textfield_->SelectRange(range); 959 textfield_->SelectRange(range);
960 } 960 }
961 961
962 string16 OmniboxViewViews::GetSelectedText() const { 962 string16 OmniboxViewViews::GetSelectedText() const {
963 // TODO(oshima): Support instant, IME. 963 // TODO(oshima): Support instant, IME.
964 return textfield_->GetSelectedText(); 964 return textfield_->GetSelectedText();
965 } 965 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698