| OLD | NEW |
| 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/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 } | 684 } |
| 685 | 685 |
| 686 gfx::NativeView OmniboxViewViews::GetNativeView() const { | 686 gfx::NativeView OmniboxViewViews::GetNativeView() const { |
| 687 return GetWidget()->GetNativeView(); | 687 return GetWidget()->GetNativeView(); |
| 688 } | 688 } |
| 689 | 689 |
| 690 gfx::NativeView OmniboxViewViews::GetRelativeWindowForPopup() const { | 690 gfx::NativeView OmniboxViewViews::GetRelativeWindowForPopup() const { |
| 691 return GetWidget()->GetTopLevelWidget()->GetNativeView(); | 691 return GetWidget()->GetTopLevelWidget()->GetNativeView(); |
| 692 } | 692 } |
| 693 | 693 |
| 694 void OmniboxViewViews::SetInstantSuggestion(const string16& input, | 694 void OmniboxViewViews::SetInstantSuggestion(const string16& input) { |
| 695 bool animate_to_complete) { | |
| 696 #if defined(OS_WIN) || defined(USE_AURA) | 695 #if defined(OS_WIN) || defined(USE_AURA) |
| 697 location_bar_view_->SetInstantSuggestion(input, animate_to_complete); | 696 location_bar_view_->SetInstantSuggestion(input); |
| 698 #endif | 697 #endif |
| 699 } | 698 } |
| 700 | 699 |
| 701 string16 OmniboxViewViews::GetInstantSuggestion() const { | 700 string16 OmniboxViewViews::GetInstantSuggestion() const { |
| 702 #if defined(OS_WIN) || defined(USE_AURA) | 701 #if defined(OS_WIN) || defined(USE_AURA) |
| 703 return location_bar_view_->GetInstantSuggestion(); | 702 return location_bar_view_->GetInstantSuggestion(); |
| 704 #else | 703 #else |
| 705 return string16(); | 704 return string16(); |
| 706 #endif | 705 #endif |
| 707 } | 706 } |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 | 942 |
| 944 string16 OmniboxViewViews::GetSelectedText() const { | 943 string16 OmniboxViewViews::GetSelectedText() const { |
| 945 // TODO(oshima): Support instant, IME. | 944 // TODO(oshima): Support instant, IME. |
| 946 return textfield_->GetSelectedText(); | 945 return textfield_->GetSelectedText(); |
| 947 } | 946 } |
| 948 | 947 |
| 949 void OmniboxViewViews::CopyURL() { | 948 void OmniboxViewViews::CopyURL() { |
| 950 const string16& text = toolbar_model()->GetText(false); | 949 const string16& text = toolbar_model()->GetText(false); |
| 951 DoCopy(text, true, toolbar_model()->GetURL(), text); | 950 DoCopy(text, true, toolbar_model()->GetURL(), text); |
| 952 } | 951 } |
| OLD | NEW |