[email protected] | 3cb0f8d9 | 2012-02-29 05:43:34 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | b76ac71 | 2011-05-03 22:17:11 | [diff] [blame] | 5 | // This file defines the interface class OmniboxView. Each toolkit will |
| 6 | // implement the edit view differently, so that code is inherently platform |
[email protected] | fbdc423 | 2012-06-24 15:28:37 | [diff] [blame] | 7 | // specific. However, the OmniboxEditModel needs to do some communication with |
| 8 | // the view. Since the model is shared between platforms, we need to define an |
| 9 | // interface that all view implementations will share. |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 10 | |
blundell | 7dbd379 | 2015-08-05 15:14:19 | [diff] [blame] | 11 | #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_ |
| 12 | #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_ |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 13 | |
avi | f57136c1 | 2015-12-25 23:27:45 | [diff] [blame] | 14 | #include <stddef.h> |
| 15 | |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 16 | #include <string> |
| 17 | |
thestig | a0e18cd | 2015-09-25 04:58:36 | [diff] [blame] | 18 | #include "base/gtest_prod_util.h" |
avi | f57136c1 | 2015-12-25 23:27:45 | [diff] [blame] | 19 | #include "base/macros.h" |
[email protected] | 1152118 | 2013-06-11 04:06:36 | [diff] [blame] | 20 | #include "base/strings/string16.h" |
| 21 | #include "base/strings/string_util.h" |
[email protected] | 5846d58 | 2013-06-08 16:02:12 | [diff] [blame] | 22 | #include "base/strings/utf_string_conversions.h" |
blundell | 2102f7c | 2015-07-09 10:00:53 | [diff] [blame] | 23 | #include "components/omnibox/browser/autocomplete_match.h" |
[email protected] | f47621b | 2013-01-22 20:50:33 | [diff] [blame] | 24 | #include "ui/base/window_open_disposition.h" |
[email protected] | 08397d5 | 2011-02-05 01:53:38 | [diff] [blame] | 25 | #include "ui/gfx/native_widget_types.h" |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 26 | |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 27 | class GURL; |
blundell | 7cda124 | 2015-07-15 09:58:20 | [diff] [blame] | 28 | class OmniboxClient; |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 29 | class OmniboxEditController; |
[email protected] | ac7cc2b6 | 2012-12-20 03:33:43 | [diff] [blame] | 30 | class OmniboxViewMacTest; |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 31 | class ToolbarModel; |
thomasanderson | 00687d0 | 2016-06-08 16:06:34 | [diff] [blame] | 32 | class OmniboxEditModel; |
[email protected] | 83a2610a | 2012-01-05 01:00:27 | [diff] [blame] | 33 | |
estade | 3c7c6b1 | 2015-11-10 01:25:37 | [diff] [blame] | 34 | namespace gfx { |
| 35 | enum class VectorIconId; |
| 36 | } |
| 37 | |
[email protected] | b76ac71 | 2011-05-03 22:17:11 | [diff] [blame] | 38 | class OmniboxView { |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 39 | public: |
thomasanderson | 00687d0 | 2016-06-08 16:06:34 | [diff] [blame] | 40 | // Represents the changes between two State objects. This is used by the |
| 41 | // model to determine how its internal state should be updated after the view |
| 42 | // state changes. See OmniboxEditModel::OnAfterPossibleChange(). |
| 43 | struct StateChanges { |
| 44 | // |old_text| and |new_text| are not owned. |
| 45 | const base::string16* old_text; |
| 46 | const base::string16* new_text; |
| 47 | size_t new_sel_start; |
| 48 | size_t new_sel_end; |
| 49 | bool selection_differs; |
| 50 | bool text_differs; |
| 51 | bool keyword_differs; |
| 52 | bool just_deleted_text; |
| 53 | }; |
| 54 | |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 55 | virtual ~OmniboxView(); |
| 56 | |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 57 | // Used by the automation system for getting at the model from the view. |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 58 | OmniboxEditModel* model() { return model_.get(); } |
| 59 | const OmniboxEditModel* model() const { return model_.get(); } |
| 60 | |
[email protected] | 508107c | 2014-03-14 06:29:28 | [diff] [blame] | 61 | // Shared cross-platform focus handling. |
| 62 | void OnDidKillFocus(); |
| 63 | |
[email protected] | 7c8147a | 2013-08-24 03:09:49 | [diff] [blame] | 64 | // Called when any relevant state changes other than changing tabs. |
| 65 | virtual void Update() = 0; |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 66 | |
[email protected] | 60b55e9 | 2014-02-12 03:14:18 | [diff] [blame] | 67 | // Asks the browser to load the specified match, using the supplied |
| 68 | // disposition. |alternate_nav_url|, if non-empty, contains the |
[email protected] | 7e41c2b | 2011-05-06 10:31:16 | [diff] [blame] | 69 | // alternate navigation URL for for this match. See comments on |
| 70 | // AutocompleteResult::GetAlternateNavURL(). |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 71 | // |
[email protected] | 60b55e9 | 2014-02-12 03:14:18 | [diff] [blame] | 72 | // |pasted_text| should only be set if this call is due to a |
| 73 | // Paste-And-Go/Search action. |
| 74 | // |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 75 | // |selected_line| is passed to SendOpenNotification(); see comments there. |
| 76 | // |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 77 | // This may close the popup. |
[email protected] | 7e41c2b | 2011-05-06 10:31:16 | [diff] [blame] | 78 | virtual void OpenMatch(const AutocompleteMatch& match, |
| 79 | WindowOpenDisposition disposition, |
| 80 | const GURL& alternate_nav_url, |
[email protected] | 60b55e9 | 2014-02-12 03:14:18 | [diff] [blame] | 81 | const base::string16& pasted_text, |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 82 | size_t selected_line); |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 83 | |
| 84 | // Returns the current text of the edit control, which could be the |
| 85 | // "temporary" text set by the popup, the "permanent" text set by the |
| 86 | // browser, or just whatever the user has currently typed. |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 87 | virtual base::string16 GetText() const = 0; |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 88 | |
[email protected] | 69c579e | 2010-04-23 20:01:00 | [diff] [blame] | 89 | // |true| if the user is in the process of editing the field, or if |
| 90 | // the field is empty. |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 91 | bool IsEditingOrEmpty() const; |
[email protected] | 69c579e | 2010-04-23 20:01:00 | [diff] [blame] | 92 | |
palmer | c354e28 | 2016-05-24 00:55:57 | [diff] [blame] | 93 | // Like GetIcon(), but returns a vector icon identifier. |
| 94 | gfx::VectorIconId GetVectorIcon() const; |
estade | 3c7c6b1 | 2015-11-10 01:25:37 | [diff] [blame] | 95 | |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 96 | // The user text is the text the user has manually keyed in. When present, |
| 97 | // this is shown in preference to the permanent text; hitting escape will |
| 98 | // revert to the permanent text. |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 99 | void SetUserText(const base::string16& text); |
| 100 | virtual void SetUserText(const base::string16& text, |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 101 | bool update_popup); |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 102 | |
[email protected] | 01b8d650 | 2013-02-15 17:35:55 | [diff] [blame] | 103 | // Sets the window text and the caret position. |notify_text_changed| is true |
| 104 | // if the model should be notified of the change. |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 105 | virtual void SetWindowTextAndCaretPos(const base::string16& text, |
[email protected] | 3cb0f8d9 | 2012-02-29 05:43:34 | [diff] [blame] | 106 | size_t caret_pos, |
| 107 | bool update_popup, |
| 108 | bool notify_text_changed) = 0; |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 109 | |
thomasanderson | 00687d0 | 2016-06-08 16:06:34 | [diff] [blame] | 110 | // Transitions the user into keyword mode with their default search provider, |
| 111 | // preserving and selecting the user's text if they already typed in a query. |
| 112 | virtual void EnterKeywordModeForDefaultSearchProvider() = 0; |
[email protected] | 731980c | 2009-06-05 19:41:46 | [diff] [blame] | 113 | |
[email protected] | 5fdafa3 | 2009-08-28 00:31:28 | [diff] [blame] | 114 | // Returns true if all text is selected or there is no text at all. |
[email protected] | fb8e3a3 | 2012-05-10 21:03:52 | [diff] [blame] | 115 | virtual bool IsSelectAll() const = 0; |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 116 | |
[email protected] | b93b79ec | 2010-11-19 20:21:22 | [diff] [blame] | 117 | // Returns true if the user deleted the suggested text. |
| 118 | virtual bool DeleteAtEndPressed() = 0; |
| 119 | |
[email protected] | 3c11b5b0 | 2010-09-11 05:20:42 | [diff] [blame] | 120 | // Fills |start| and |end| with the indexes of the current selection's bounds. |
| 121 | // It is not guaranteed that |*start < *end|, as the selection can be |
| 122 | // directed. If there is no selection, |start| and |end| will both be equal |
| 123 | // to the current cursor position. |
[email protected] | 4003e72 | 2011-10-31 05:04:03 | [diff] [blame] | 124 | virtual void GetSelectionBounds(size_t* start, size_t* end) const = 0; |
[email protected] | 3c11b5b0 | 2010-09-11 05:20:42 | [diff] [blame] | 125 | |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 126 | // Selects all the text in the edit. Use this in place of SetSelAll() to |
| 127 | // avoid selecting the "phantom newline" at the end of the edit. |
| 128 | virtual void SelectAll(bool reversed) = 0; |
| 129 | |
treib | f5a2901 | 2016-09-02 11:08:13 | [diff] [blame] | 130 | // Reverts the edit and popup back to their unedited state (permanent text |
| 131 | // showing, popup closed, no user input in progress). |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 132 | virtual void RevertAll(); |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 133 | |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 134 | // Updates the autocomplete popup and other state after the text has been |
| 135 | // changed by the user. |
| 136 | virtual void UpdatePopup() = 0; |
| 137 | |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 138 | // Closes the autocomplete popup, if it's open. The name |ClosePopup| |
| 139 | // conflicts with the OSX class override as that has a base class that also |
| 140 | // defines a method with that name. |
| 141 | virtual void CloseOmniboxPopup(); |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 142 | |
[email protected] | 2be2c013 | 2009-09-14 20:20:35 | [diff] [blame] | 143 | // Sets the focus to the autocomplete view. |
| 144 | virtual void SetFocus() = 0; |
| 145 | |
[email protected] | c18cb67 | 2012-12-05 04:42:12 | [diff] [blame] | 146 | // Shows or hides the caret based on whether the model's is_caret_visible() is |
| 147 | // true. |
| 148 | virtual void ApplyCaretVisibility() = 0; |
| 149 | |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 150 | // Called when the temporary text in the model may have changed. |
| 151 | // |display_text| is the new text to show; |save_original_selection| is true |
| 152 | // when there wasn't previously a temporary text and thus we need to save off |
[email protected] | 01b8d650 | 2013-02-15 17:35:55 | [diff] [blame] | 153 | // the user's existing selection. |notify_text_changed| is true if the model |
| 154 | // should be notified of the change. |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 155 | virtual void OnTemporaryTextMaybeChanged(const base::string16& display_text, |
[email protected] | 01b8d650 | 2013-02-15 17:35:55 | [diff] [blame] | 156 | bool save_original_selection, |
| 157 | bool notify_text_changed) = 0; |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 158 | |
| 159 | // Called when the inline autocomplete text in the model may have changed. |
| 160 | // |display_text| is the new text to show; |user_text_length| is the length of |
| 161 | // the user input portion of that (so, up to but not including the inline |
| 162 | // autocompletion). Returns whether the display text actually changed. |
| 163 | virtual bool OnInlineAutocompleteTextMaybeChanged( |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 164 | const base::string16& display_text, size_t user_text_length) = 0; |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 165 | |
[email protected] | fa99576 | 2013-11-18 11:05:52 | [diff] [blame] | 166 | // Called when the inline autocomplete text in the model has been cleared. |
| 167 | virtual void OnInlineAutocompleteTextCleared() = 0; |
| 168 | |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 169 | // Called when the temporary text has been reverted by the user. This will |
| 170 | // reset the user's original selection. |
| 171 | virtual void OnRevertTemporaryText() = 0; |
| 172 | |
[email protected] | bbe5b49e | 2013-04-05 02:27:01 | [diff] [blame] | 173 | // Checkpoints the current edit state before an operation that might trigger |
| 174 | // a new autocomplete run to open or modify the popup. Call this before |
| 175 | // user-initiated edit actions that trigger autocomplete, but *not* for |
| 176 | // automatic changes to the textfield that should not affect autocomplete. |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 177 | virtual void OnBeforePossibleChange() = 0; |
| 178 | // OnAfterPossibleChange() returns true if there was a change that caused it |
mpearson | 49fa6dc | 2015-12-01 22:20:10 | [diff] [blame] | 179 | // to call UpdatePopup(). If |allow_keyword_ui_change| is false, we |
| 180 | // prevent alterations to the keyword UI state (enabled vs. disabled). |
| 181 | virtual bool OnAfterPossibleChange(bool allow_keyword_ui_change) = 0; |
[email protected] | fb5153c5 | 2009-07-31 19:40:33 | [diff] [blame] | 182 | |
| 183 | // Returns the gfx::NativeView of the edit view. |
| 184 | virtual gfx::NativeView GetNativeView() const = 0; |
[email protected] | 135fd3b6 | 2009-12-16 01:07:08 | [diff] [blame] | 185 | |
[email protected] | b2544aa9 | 2012-06-21 04:20:09 | [diff] [blame] | 186 | // Gets the relative window for the pop up window of OmniboxPopupView. The pop |
| 187 | // up window will be shown under the relative window. When an IME is attached |
| 188 | // to the rich edit control, the IME window is the relative window. Otherwise, |
| 189 | // the top-most window is the relative window. |
[email protected] | 3510d44 | 2011-10-07 22:13:46 | [diff] [blame] | 190 | virtual gfx::NativeView GetRelativeWindowForPopup() const = 0; |
| 191 | |
[email protected] | b1a843a4 | 2013-07-11 15:11:41 | [diff] [blame] | 192 | // Shows |input| as gray suggested text after what the user has typed. |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 193 | virtual void SetGrayTextAutocompletion(const base::string16& input) = 0; |
[email protected] | eec44d94 | 2011-01-11 08:27:24 | [diff] [blame] | 194 | |
[email protected] | b1a843a4 | 2013-07-11 15:11:41 | [diff] [blame] | 195 | // Returns the current gray suggested text. |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 196 | virtual base::string16 GetGrayTextAutocompletion() const = 0; |
[email protected] | 911696b | 2011-01-28 02:36:49 | [diff] [blame] | 197 | |
[email protected] | eec44d94 | 2011-01-11 08:27:24 | [diff] [blame] | 198 | // Returns the width in pixels needed to display the current text. The |
| 199 | // returned value includes margins. |
[email protected] | 14ac349 | 2013-12-16 20:02:49 | [diff] [blame] | 200 | virtual int GetTextWidth() const = 0; |
| 201 | |
| 202 | // Returns the omnibox's width in pixels. |
| 203 | virtual int GetWidth() const = 0; |
[email protected] | eec44d94 | 2011-01-11 08:27:24 | [diff] [blame] | 204 | |
[email protected] | 28ea1c9 | 2011-01-13 00:30:18 | [diff] [blame] | 205 | // Returns true if the user is composing something in an IME. |
| 206 | virtual bool IsImeComposing() const = 0; |
| 207 | |
[email protected] | d4606b5d | 2013-06-20 22:38:59 | [diff] [blame] | 208 | // Returns true if we know for sure that an IME is showing a popup window, |
| 209 | // which may overlap the omnibox's popup window. |
[email protected] | 1317783 | 2013-05-31 07:46:05 | [diff] [blame] | 210 | virtual bool IsImeShowingPopup() const; |
| 211 | |
[email protected] | 183e28d | 2014-01-20 18:18:02 | [diff] [blame] | 212 | // Display a virtual keybaord or alternate input view if enabled. |
| 213 | virtual void ShowImeIfNeeded(); |
| 214 | |
[email protected] | 40a0115 | 2013-06-20 03:52:00 | [diff] [blame] | 215 | // Returns true if the view is displaying UI that indicates that query |
| 216 | // refinement will take place when the user selects the current match. For |
| 217 | // search matches, this will cause the omnibox to search over the existing |
| 218 | // corpus (e.g. Images) rather than start a new Web search. This method will |
| 219 | // only ever return true on mobile ports. |
| 220 | virtual bool IsIndicatingQueryRefinement() const; |
| 221 | |
pkasting | da6dd84 | 2016-02-24 15:26:59 | [diff] [blame] | 222 | // Called after a match has been opened. |
| 223 | virtual void OnMatchOpened(AutocompleteMatch::Type match_type); |
[email protected] | 94b8a51a | 2014-03-26 20:57:55 | [diff] [blame] | 224 | |
[email protected] | 6cf51b6 | 2013-08-10 13:49:22 | [diff] [blame] | 225 | // Returns |text| with any leading javascript schemas stripped. |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 226 | static base::string16 StripJavascriptSchemas(const base::string16& text); |
[email protected] | 067095a | 2011-05-24 23:43:44 | [diff] [blame] | 227 | |
[email protected] | 6cf51b6 | 2013-08-10 13:49:22 | [diff] [blame] | 228 | // First, calls StripJavascriptSchemas(). Then automatically collapses |
| 229 | // internal whitespace as follows: |
| 230 | // * If the only whitespace in |text| is newlines, users are most likely |
| 231 | // pasting in URLs split into multiple lines by terminals, email programs, |
| 232 | // etc. So all newlines are removed. |
| 233 | // * Otherwise, users may be pasting in search data, e.g. street addresses. In |
| 234 | // this case, runs of whitespace are collapsed down to single spaces. |
[email protected] | e9273e19 | 2013-12-11 17:51:49 | [diff] [blame] | 235 | static base::string16 SanitizeTextForPaste(const base::string16& text); |
[email protected] | 6cf51b6 | 2013-08-10 13:49:22 | [diff] [blame] | 236 | |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 237 | protected: |
thomasanderson | 00687d0 | 2016-06-08 16:06:34 | [diff] [blame] | 238 | // Tracks important state that may change between OnBeforePossibleChange() and |
| 239 | // OnAfterPossibleChange(). |
| 240 | struct State { |
| 241 | base::string16 text; |
| 242 | base::string16 keyword; |
| 243 | bool is_keyword_selected; |
| 244 | size_t sel_start; |
| 245 | size_t sel_end; |
| 246 | }; |
| 247 | |
blundell | d28fa85 | 2015-08-04 16:19:54 | [diff] [blame] | 248 | OmniboxView(OmniboxEditController* controller, |
dcheng | 259570c | 2016-04-22 00:45:57 | [diff] [blame] | 249 | std::unique_ptr<OmniboxClient> client); |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 250 | |
thomasanderson | 00687d0 | 2016-06-08 16:06:34 | [diff] [blame] | 251 | // Fills |state| with the current text state. |
| 252 | void GetState(State* state); |
| 253 | |
| 254 | // Returns the delta between |before| and |after|. |
| 255 | StateChanges GetStateChanges(const State& before, |
| 256 | const State& after); |
| 257 | |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 258 | // Internally invoked whenever the text changes in some way. |
| 259 | virtual void TextChanged(); |
| 260 | |
| 261 | // Return the number of characters in the current buffer. The name |
| 262 | // |GetTextLength| can't be used as the Windows override of this class |
| 263 | // inherits from a class that defines a method with that name. |
| 264 | virtual int GetOmniboxTextLength() const = 0; |
| 265 | |
| 266 | // Try to parse the current text as a URL and colorize the components. |
| 267 | virtual void EmphasizeURLComponents() = 0; |
| 268 | |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 269 | OmniboxEditController* controller() { return controller_; } |
[email protected] | a40be8b | 2013-08-22 20:12:14 | [diff] [blame] | 270 | const OmniboxEditController* controller() const { return controller_; } |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 271 | |
| 272 | private: |
[email protected] | ac7cc2b6 | 2012-12-20 03:33:43 | [diff] [blame] | 273 | friend class OmniboxViewMacTest; |
[email protected] | ac7cc2b6 | 2012-12-20 03:33:43 | [diff] [blame] | 274 | |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 275 | // |model_| can be NULL in tests. |
dcheng | 259570c | 2016-04-22 00:45:57 | [diff] [blame] | 276 | std::unique_ptr<OmniboxEditModel> model_; |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 277 | OmniboxEditController* controller_; |
[email protected] | c51eed7 | 2012-08-07 22:01:55 | [diff] [blame] | 278 | |
blundell | 18b35fd | 2015-07-28 13:16:06 | [diff] [blame] | 279 | DISALLOW_COPY_AND_ASSIGN(OmniboxView); |
[email protected] | 93e5033 | 2009-03-02 18:58:26 | [diff] [blame] | 280 | }; |
| 281 | |
blundell | 7dbd379 | 2015-08-05 15:14:19 | [diff] [blame] | 282 | #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_ |