| 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_MODEL_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_MODEL_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_MODEL_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "chrome/browser/autocomplete/autocomplete.h" | 9 #include "chrome/browser/autocomplete/autocomplete.h" |
| 10 #include "chrome/common/notification_registrar.h" | 10 #include "chrome/common/notification_registrar.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // | 79 // |
| 80 // If |transition_type| is non-NULL, it will be set to the appropriate | 80 // If |transition_type| is non-NULL, it will be set to the appropriate |
| 81 // transition type for the selected entry (TYPED or GENERATED). | 81 // transition type for the selected entry (TYPED or GENERATED). |
| 82 // | 82 // |
| 83 // If |is_history_what_you_typed_match| is non-NULL, it will be set based on | 83 // If |is_history_what_you_typed_match| is non-NULL, it will be set based on |
| 84 // the selected entry's is_history_what_you_typed value. | 84 // the selected entry's is_history_what_you_typed value. |
| 85 // | 85 // |
| 86 // If |alternate_nav_url| is non-NULL, it will be set to the alternate | 86 // If |alternate_nav_url| is non-NULL, it will be set to the alternate |
| 87 // navigation URL for |url| if one exists, or left unchanged otherwise. See | 87 // navigation URL for |url| if one exists, or left unchanged otherwise. See |
| 88 // comments on AutocompleteResult::GetAlternateNavURL(). | 88 // comments on AutocompleteResult::GetAlternateNavURL(). |
| 89 // |
| 90 // TODO(pkasting): When manually_selected_match_ moves to the controller, this |
| 91 // can move too. |
| 89 GURL URLsForCurrentSelection( | 92 GURL URLsForCurrentSelection( |
| 90 PageTransition::Type* transition, | 93 PageTransition::Type* transition, |
| 91 bool* is_history_what_you_typed_match, | 94 bool* is_history_what_you_typed_match, |
| 92 GURL* alternate_nav_url) const; | 95 GURL* alternate_nav_url) const; |
| 93 | 96 |
| 94 // This is sort of a hybrid between StartAutocomplete() and | 97 // This is sort of a hybrid between StartAutocomplete() and |
| 95 // URLForCurrentSelection(). When the popup isn't open and the user hits | 98 // URLForCurrentSelection(). When the popup isn't open and the user hits |
| 96 // enter, we want to get the default match for the user's input immediately, | 99 // enter, we want to get the default match for the user's input immediately, |
| 97 // and not open the popup, continue running autocomplete, etc. Therefore, | 100 // and not open the popup, continue running autocomplete, etc. Therefore, |
| 98 // this does a query for only the synchronously available matches for the | 101 // this does a query for only the synchronously available matches for the |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 AutocompleteResult::Selection manually_selected_match_; | 169 AutocompleteResult::Selection manually_selected_match_; |
| 167 | 170 |
| 168 // A hack for URLsForDefaultMatch() that makes the code in Observe() do | 171 // A hack for URLsForDefaultMatch() that makes the code in Observe() do |
| 169 // nothing. | 172 // nothing. |
| 170 bool inside_synchronous_query_; | 173 bool inside_synchronous_query_; |
| 171 | 174 |
| 172 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupModel); | 175 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupModel); |
| 173 }; | 176 }; |
| 174 | 177 |
| 175 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_MODEL_H_ | 178 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_MODEL_H_ |
| OLD | NEW |