OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_MODEL_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_MODEL_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_MODEL_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_MODEL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 enum ControlKeyState { | 365 enum ControlKeyState { |
366 UP, // The control key is not depressed. | 366 UP, // The control key is not depressed. |
367 DOWN_WITHOUT_CHANGE, // The control key is depressed, and the edit's | 367 DOWN_WITHOUT_CHANGE, // The control key is depressed, and the edit's |
368 // contents/selection have not changed since it was | 368 // contents/selection have not changed since it was |
369 // depressed. This is the only state in which we | 369 // depressed. This is the only state in which we |
370 // do the "ctrl-enter" behavior when the user hits | 370 // do the "ctrl-enter" behavior when the user hits |
371 // enter. | 371 // enter. |
372 DOWN_WITH_CHANGE, // The control key is depressed, and the edit's | 372 DOWN_WITH_CHANGE, // The control key is depressed, and the edit's |
373 // contents/selection have changed since it was | 373 // contents/selection have changed since it was |
374 // depressed. If the user now hits enter, we assume | 374 // depressed. If the user now hits enter, we assume |
375 // he simply hasn't released the key, rather than that | 375 // they simply haven't released the key, rather than |
376 // he intended to hit "ctrl-enter". | 376 // that they intended to hit "ctrl-enter". |
377 }; | 377 }; |
378 | 378 |
379 // Returns true if a query to an autocomplete provider is currently | 379 // Returns true if a query to an autocomplete provider is currently |
380 // in progress. This logic should in the future live in | 380 // in progress. This logic should in the future live in |
381 // AutocompleteController but resides here for now. This method is used by | 381 // AutocompleteController but resides here for now. This method is used by |
382 // AutomationProvider::AutocompleteEditIsQueryInProgress. | 382 // AutomationProvider::AutocompleteEditIsQueryInProgress. |
383 bool query_in_progress() const { return !autocomplete_controller()->done(); } | 383 bool query_in_progress() const { return !autocomplete_controller()->done(); } |
384 | 384 |
385 // Returns true if the popup exists and is open. (This is a convenience | 385 // Returns true if the popup exists and is open. (This is a convenience |
386 // wrapper for the benefit of test code, which may not have a popup model.) | 386 // wrapper for the benefit of test code, which may not have a popup model.) |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 | 572 |
573 // The input that was sent to the AutocompleteController. Since no | 573 // The input that was sent to the AutocompleteController. Since no |
574 // autocomplete query is started after a tab switch, it is possible for this | 574 // autocomplete query is started after a tab switch, it is possible for this |
575 // |input_| to differ from the one currently stored in AutocompleteController. | 575 // |input_| to differ from the one currently stored in AutocompleteController. |
576 AutocompleteInput input_; | 576 AutocompleteInput input_; |
577 | 577 |
578 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 578 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
579 }; | 579 }; |
580 | 580 |
581 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_MODEL_H_ | 581 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_MODEL_H_ |
OLD | NEW |