Chromium Code Reviews| Index: chrome/browser/ui/browser_instant_controller.cc |
| diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc |
| index c36cad8f18c4a95cdad1b152c92d0a5434947b9f..3082799b6dcb1ae3edb463e8027d699a293e188c 100644 |
| --- a/chrome/browser/ui/browser_instant_controller.cc |
| +++ b/chrome/browser/ui/browser_instant_controller.cc |
| @@ -189,6 +189,18 @@ void BrowserInstantController::OpenURL( |
| false)); |
| } |
| +void BrowserInstantController::PasteIntoOmnibox() { |
| + OmniboxView* omnibox_view = browser_->window()->GetLocationBar()-> |
| + GetLocationEntry(); |
| + string16 clipboardText = omnibox_view->GetClipboardText(); |
| + |
| + if (!clipboardText.empty()) { |
| + omnibox_view->OnBeforePossibleChange(); |
| + omnibox_view->SetUserText(clipboardText); |
|
samarth
2013/07/26 22:51:41
I think you also want to call omnibox_view->model(
jfweitz
2013/07/29 18:48:25
Done.
|
| + omnibox_view->OnAfterPossibleChange(); |
| + } |
| +} |
| + |
| void BrowserInstantController::SetOmniboxBounds(const gfx::Rect& bounds) { |
| instant_.SetOmniboxBounds(bounds); |
| } |