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

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

Issue 1935663002: New origin security indicator icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorten the Views GetSecureTextColor further, thanks to pkasting. Created 4 years, 7 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // browser, or just whatever the user has currently typed. 71 // browser, or just whatever the user has currently typed.
72 virtual base::string16 GetText() const = 0; 72 virtual base::string16 GetText() const = 0;
73 73
74 // |true| if the user is in the process of editing the field, or if 74 // |true| if the user is in the process of editing the field, or if
75 // the field is empty. 75 // the field is empty.
76 bool IsEditingOrEmpty() const; 76 bool IsEditingOrEmpty() const;
77 77
78 // Returns the resource ID of the icon to show for the current text. 78 // Returns the resource ID of the icon to show for the current text.
79 int GetIcon() const; 79 int GetIcon() const;
80 80
81 // Like GetIcon(), but returns a vector icon identifier. If |invert| is true, 81 // Like GetIcon(), but returns a vector icon identifier.
82 // this returns an icon suitable for display in an inverted (light-on-dark) 82 gfx::VectorIconId GetVectorIcon() const;
83 // color scheme.
84 gfx::VectorIconId GetVectorIcon(bool invert) const;
85 83
86 // The user text is the text the user has manually keyed in. When present, 84 // The user text is the text the user has manually keyed in. When present,
87 // this is shown in preference to the permanent text; hitting escape will 85 // this is shown in preference to the permanent text; hitting escape will
88 // revert to the permanent text. 86 // revert to the permanent text.
89 void SetUserText(const base::string16& text); 87 void SetUserText(const base::string16& text);
90 virtual void SetUserText(const base::string16& text, 88 virtual void SetUserText(const base::string16& text,
91 bool update_popup); 89 bool update_popup);
92 90
93 // Sets the window text and the caret position. |notify_text_changed| is true 91 // Sets the window text and the caret position. |notify_text_changed| is true
94 // if the model should be notified of the change. 92 // if the model should be notified of the change.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ShowURL); 261 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ShowURL);
264 262
265 // |model_| can be NULL in tests. 263 // |model_| can be NULL in tests.
266 std::unique_ptr<OmniboxEditModel> model_; 264 std::unique_ptr<OmniboxEditModel> model_;
267 OmniboxEditController* controller_; 265 OmniboxEditController* controller_;
268 266
269 DISALLOW_COPY_AND_ASSIGN(OmniboxView); 267 DISALLOW_COPY_AND_ASSIGN(OmniboxView);
270 }; 268 };
271 269
272 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_ 270 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698