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 // This file defines helper functions shared by the various implementations | 5 // This file defines helper functions shared by the various implementations |
6 // of OmniboxView. | 6 // of OmniboxView. |
7 | 7 |
8 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 8 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
154 if (profile) | 154 if (profile) |
155 model_.reset(new OmniboxEditModel(this, controller, profile)); | 155 model_.reset(new OmniboxEditModel(this, controller, profile)); |
156 } | 156 } |
157 | 157 |
158 void OmniboxView::TextChanged() { | 158 void OmniboxView::TextChanged() { |
159 EmphasizeURLComponents(); | 159 EmphasizeURLComponents(); |
160 if (model_.get()) | 160 if (model_.get()) |
161 model_->OnChanged(); | 161 model_->OnChanged(); |
162 } | 162 } |
163 | 163 |
164 void OmniboxView::ShowURL() { | 164 void OmniboxView::ShowURL() { |
Greg Billock
2013/12/11 19:37:35
Is making the method public done in another change
| |
165 SetFocus(); | |
165 controller_->GetToolbarModel()->set_url_replacement_enabled(false); | 166 controller_->GetToolbarModel()->set_url_replacement_enabled(false); |
166 model_->UpdatePermanentText(); | 167 model_->UpdatePermanentText(); |
167 RevertWithoutResettingSearchTermReplacement(); | 168 RevertWithoutResettingSearchTermReplacement(); |
168 SelectAll(true); | 169 SelectAll(true); |
169 } | 170 } |
OLD | NEW |