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 CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 // Focus changed because user started typing. This only happens when focus | 57 // Focus changed because user started typing. This only happens when focus |
58 // state is INVISIBLE (and this results in a change to VISIBLE). | 58 // state is INVISIBLE (and this results in a change to VISIBLE). |
59 OMNIBOX_FOCUS_CHANGE_TYPING, | 59 OMNIBOX_FOCUS_CHANGE_TYPING, |
60 }; | 60 }; |
61 | 61 |
62 class OmniboxEditModel : public AutocompleteControllerDelegate { | 62 class OmniboxEditModel : public AutocompleteControllerDelegate { |
63 public: | 63 public: |
64 struct State { | 64 struct State { |
65 State(bool user_input_in_progress, | 65 State(bool user_input_in_progress, |
66 const string16& user_text, | 66 const string16& user_text, |
67 const string16& suggest_text, | |
67 const string16& keyword, | 68 const string16& keyword, |
68 bool is_keyword_hint, | 69 bool is_keyword_hint, |
69 OmniboxFocusState focus_state); | 70 OmniboxFocusState focus_state); |
70 ~State(); | 71 ~State(); |
71 | 72 |
72 bool user_input_in_progress; | 73 bool user_input_in_progress; |
73 const string16 user_text; | 74 const string16 user_text; |
75 const string16 suggest_text; | |
Peter Kasting
2013/03/30 18:48:21
Nit: Maybe name this "instant_suggestion" since th
sail
2013/04/02 22:32:06
Done.
| |
74 const string16 keyword; | 76 const string16 keyword; |
75 const bool is_keyword_hint; | 77 const bool is_keyword_hint; |
76 OmniboxFocusState focus_state; | 78 OmniboxFocusState focus_state; |
77 }; | 79 }; |
78 | 80 |
79 OmniboxEditModel(OmniboxView* view, | 81 OmniboxEditModel(OmniboxView* view, |
80 OmniboxEditController* controller, | 82 OmniboxEditController* controller, |
81 Profile* profile); | 83 Profile* profile); |
82 virtual ~OmniboxEditModel(); | 84 virtual ~OmniboxEditModel(); |
83 | 85 |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
549 // an exact keyword match. If this is true then keyword mode will be | 551 // an exact keyword match. If this is true then keyword mode will be |
550 // triggered automatically if the input is "<keyword> <search string>". We | 552 // triggered automatically if the input is "<keyword> <search string>". We |
551 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. | 553 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. |
552 // This has no effect if we're already in keyword mode. | 554 // This has no effect if we're already in keyword mode. |
553 bool allow_exact_keyword_match_; | 555 bool allow_exact_keyword_match_; |
554 | 556 |
555 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 557 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
556 }; | 558 }; |
557 | 559 |
558 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 560 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
OLD | NEW |