OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 9 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" |
10 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 10 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
11 #include "chrome/browser/autocomplete/keyword_provider.h" | 11 #include "chrome/browser/autocomplete/keyword_provider.h" |
12 #include "chrome/browser/metrics/user_metrics.h" | 12 #include "chrome/browser/metrics/user_metrics.h" |
13 #include "chrome/browser/net/url_fixer_upper.h" | 13 #include "chrome/browser/net/url_fixer_upper.h" |
14 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profile.h" |
15 #include "chrome/browser/search_engines/template_url.h" | 15 #include "chrome/browser/search_engines/template_url.h" |
16 #include "chrome/browser/search_engines/template_url_model.h" | 16 #include "chrome/browser/search_engines/template_url_model.h" |
17 #include "chrome/common/notification_service.h" | 17 #include "chrome/common/notification_service.h" |
18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
19 #include "googleurl/src/url_util.h" | 19 #include "googleurl/src/url_util.h" |
20 #include "skia/include/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
21 | 21 |
22 /////////////////////////////////////////////////////////////////////////////// | 22 /////////////////////////////////////////////////////////////////////////////// |
23 // AutocompleteEditModel | 23 // AutocompleteEditModel |
24 | 24 |
25 // A single AutocompleteController used solely for making synchronous calls to | 25 // A single AutocompleteController used solely for making synchronous calls to |
26 // determine how to deal with the clipboard contents for Paste And Go | 26 // determine how to deal with the clipboard contents for Paste And Go |
27 // functionality. We avoid using the popup's controller here because we don't | 27 // functionality. We avoid using the popup's controller here because we don't |
28 // want to interrupt in-progress queries or modify the popup state just | 28 // want to interrupt in-progress queries or modify the popup state just |
29 // because the user right-clicked the edit. We don't need a controller for | 29 // because the user right-clicked the edit. We don't need a controller for |
30 // every edit because this will always be accessed on the main thread, so we | 30 // every edit because this will always be accessed on the main thread, so we |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 GURL* alternate_nav_url) { | 544 GURL* alternate_nav_url) { |
545 return (popup_->IsOpen() || !popup_->autocomplete_controller()->done()) ? | 545 return (popup_->IsOpen() || !popup_->autocomplete_controller()->done()) ? |
546 popup_->URLsForCurrentSelection(transition, | 546 popup_->URLsForCurrentSelection(transition, |
547 is_history_what_you_typed_match, | 547 is_history_what_you_typed_match, |
548 alternate_nav_url) : | 548 alternate_nav_url) : |
549 popup_->URLsForDefaultMatch(UserTextFromDisplayText(view_->GetText()), | 549 popup_->URLsForDefaultMatch(UserTextFromDisplayText(view_->GetText()), |
550 GetDesiredTLD(), transition, | 550 GetDesiredTLD(), transition, |
551 is_history_what_you_typed_match, | 551 is_history_what_you_typed_match, |
552 alternate_nav_url); | 552 alternate_nav_url); |
553 } | 553 } |
OLD | NEW |