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

Unified Diff: components/omnibox/browser/omnibox_view.h

Issue 2641003002: Show scheme in black and content in gray for data: protocol urls (Closed)
Patch Set: Update iOS Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/omnibox/browser/omnibox_view.h
diff --git a/components/omnibox/browser/omnibox_view.h b/components/omnibox/browser/omnibox_view.h
index ba019537e2f831b66a4ba7a6c8621656e82b2f87..2a81581ddc5ccfca209ae8961258afba4e58cac8 100644
--- a/components/omnibox/browser/omnibox_view.h
+++ b/components/omnibox/browser/omnibox_view.h
@@ -23,6 +23,7 @@
#include "components/omnibox/browser/autocomplete_match.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/range/range.h"
class GURL;
class OmniboxClient;
@@ -259,6 +260,19 @@ class OmniboxView {
OmniboxEditController* controller() { return controller_; }
const OmniboxEditController* controller() const { return controller_; }
+ // Subclasses use this to set colors on ranges of the text. Pass an invalid
+ // range to indicate the base level of emphasis for the text.
Peter Kasting 2017/03/01 02:39:11 Nit: Maybe this would be more descriptive while be
elawrence 2017/03/01 21:49:02 Done.
+ virtual void SetEmphasis(bool emphasize, gfx::Range);
Peter Kasting 2017/03/01 02:39:11 I'd make these two functions pure virtual. All su
Robert Sesek 2017/03/01 18:29:45 The gfx::Range argument here and on line 269 could
elawrence 2017/03/01 21:49:01 Done.
elawrence 2017/03/01 21:49:02 Done.
+
+ // Subclasses use this to apply styles to the scheme based on the security
+ // state. An invalid range indicates that the text does not contain a scheme.
+ virtual void UpdateSchemeEmphasis(gfx::Range range);
Peter Kasting 2017/03/01 02:39:11 Nit: I might call this UpdateSchemeStyle() or some
elawrence 2017/03/01 21:49:01 Done.
+
+ // Deemphasize parts of the URL to draw attention to whatever best represents
Peter Kasting 2017/03/01 02:39:11 Nit: Descriptive, not imperative
elawrence 2017/03/01 21:49:02 Done.
+ // the "identity" of the URL.
+ void ApplyEmphasis(const base::string16& display_text,
Peter Kasting 2017/03/01 02:39:11 Nit: I wonder if this title is too specific now th
elawrence 2017/03/01 21:49:02 Done.
+ const AutocompleteSchemeClassifier& classifier);
+
private:
friend class OmniboxViewMacTest;

Powered by Google App Engine
This is Rietveld 408576698