Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Side by Side Diff: components/omnibox/browser/omnibox_view.h

Issue 2399333002: Revert of Delete pre-MD code from OmniboxResultView (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // This file defines the interface class OmniboxView. Each toolkit will 5 // This file defines the interface class OmniboxView. Each toolkit will
6 // implement the edit view differently, so that code is inherently platform 6 // implement the edit view differently, so that code is inherently platform
7 // specific. However, the OmniboxEditModel needs to do some communication with 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 8 // the view. Since the model is shared between platforms, we need to define an
9 // interface that all view implementations will share. 9 // interface that all view implementations will share.
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // Returns the current text of the edit control, which could be the 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 85 // "temporary" text set by the popup, the "permanent" text set by the
86 // browser, or just whatever the user has currently typed. 86 // browser, or just whatever the user has currently typed.
87 virtual base::string16 GetText() const = 0; 87 virtual base::string16 GetText() const = 0;
88 88
89 // |true| if the user is in the process of editing the field, or if 89 // |true| if the user is in the process of editing the field, or if
90 // the field is empty. 90 // the field is empty.
91 bool IsEditingOrEmpty() const; 91 bool IsEditingOrEmpty() const;
92 92
93 // Returns the resource ID of the icon to show for the current text.
94 int GetIcon() const;
95
93 // Like GetIcon(), but returns a vector icon identifier. 96 // Like GetIcon(), but returns a vector icon identifier.
94 gfx::VectorIconId GetVectorIcon() const; 97 gfx::VectorIconId GetVectorIcon() const;
95 98
96 // The user text is the text the user has manually keyed in. When present, 99 // 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 100 // this is shown in preference to the permanent text; hitting escape will
98 // revert to the permanent text. 101 // revert to the permanent text.
99 void SetUserText(const base::string16& text); 102 void SetUserText(const base::string16& text);
100 virtual void SetUserText(const base::string16& text, 103 virtual void SetUserText(const base::string16& text,
101 bool update_popup); 104 bool update_popup);
102 105
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 friend class OmniboxViewMacTest; 276 friend class OmniboxViewMacTest;
274 277
275 // |model_| can be NULL in tests. 278 // |model_| can be NULL in tests.
276 std::unique_ptr<OmniboxEditModel> model_; 279 std::unique_ptr<OmniboxEditModel> model_;
277 OmniboxEditController* controller_; 280 OmniboxEditController* controller_;
278 281
279 DISALLOW_COPY_AND_ASSIGN(OmniboxView); 282 DISALLOW_COPY_AND_ASSIGN(OmniboxView);
280 }; 283 };
281 284
282 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_ 285 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_
OLDNEW
« no previous file with comments | « components/omnibox/browser/autocomplete_match.cc ('k') | components/omnibox/browser/omnibox_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698