| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/autocomplete/autocomplete_edit.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 UseVerbatimInstant(), &suggested_text); | 229 UseVerbatimInstant(), &suggested_text); |
| 230 } | 230 } |
| 231 } else { | 231 } else { |
| 232 instant->DestroyPreviewContents(); | 232 instant->DestroyPreviewContents(); |
| 233 } | 233 } |
| 234 might_support_instant = instant->MightSupportInstant(); | 234 might_support_instant = instant->MightSupportInstant(); |
| 235 } else if (user_input_in_progress() && popup_->IsOpen()) { | 235 } else if (user_input_in_progress() && popup_->IsOpen()) { |
| 236 // Start Prerender of this page instead. | 236 // Start Prerender of this page instead. |
| 237 CHECK(tab->tab_contents()); | 237 CHECK(tab->tab_contents()); |
| 238 prerender::PrerenderManager* prerender_manager = | 238 prerender::PrerenderManager* prerender_manager = |
| 239 tab->tab_contents()->profile()->GetPrerenderManager(); | 239 tab->profile()->GetPrerenderManager(); |
| 240 if (prerender_manager) { | 240 if (prerender_manager) { |
| 241 prerender_manager->AddPrerenderFromOmnibox( | 241 prerender_manager->AddPrerenderFromOmnibox( |
| 242 CurrentMatch().destination_url); | 242 CurrentMatch().destination_url); |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 } | 245 } |
| 246 | 246 |
| 247 if (!might_support_instant) { | 247 if (!might_support_instant) { |
| 248 // Hide any suggestions we might be showing. | 248 // Hide any suggestions we might be showing. |
| 249 view_->SetInstantSuggestion(string16(), false); | 249 view_->SetInstantSuggestion(string16(), false); |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 // static | 1019 // static |
| 1020 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) { | 1020 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) { |
| 1021 switch (c) { | 1021 switch (c) { |
| 1022 case 0x0020: // Space | 1022 case 0x0020: // Space |
| 1023 case 0x3000: // Ideographic Space | 1023 case 0x3000: // Ideographic Space |
| 1024 return true; | 1024 return true; |
| 1025 default: | 1025 default: |
| 1026 return false; | 1026 return false; |
| 1027 } | 1027 } |
| 1028 } | 1028 } |
| OLD | NEW |