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

Unified Diff: ios/chrome/browser/ui/omnibox/omnibox_view_ios.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: ios/chrome/browser/ui/omnibox/omnibox_view_ios.h
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_view_ios.h b/ios/chrome/browser/ui/omnibox/omnibox_view_ios.h
index 8a99c43018940de96a284a281733504374fc632b..8c8cf0feaad6d8708a2569006489a4bf0a31b92c 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_view_ios.h
+++ b/ios/chrome/browser/ui/omnibox/omnibox_view_ios.h
@@ -40,6 +40,10 @@ class OmniboxViewIOS : public OmniboxView {
id<OmniboxPopupPositioner> positioner);
~OmniboxViewIOS() override;
+ static UIColor* GetSecureTextColor(
Eugene But (OOO till 7-30) 2017/02/28 23:04:38 Could you please add comments
elawrence 2017/03/01 21:49:02 Done.
+ security_state::SecurityLevel security_level,
+ bool in_dark_mode);
Eugene But (OOO till 7-30) 2017/02/28 23:04:38 Do you want to add enum instead of this bool? Othe
elawrence 2017/03/01 21:49:02 I'm inclined to leave this as it is to match Mac's
+
// OmniboxView implementation.
void OpenMatch(const AutocompleteMatch& match,
WindowOpenDisposition disposition,
@@ -137,6 +141,12 @@ class OmniboxViewIOS : public OmniboxView {
// returns them in an autoreleased object.
NSAttributedString* ApplyTextAttributes(const base::string16& text);
+ // Update colors in |attributing_display_string_|.
Eugene But (OOO till 7-30) 2017/02/28 23:04:38 Do you want to explain what this method does from
Eugene But (OOO till 7-30) 2017/02/28 23:04:38 s/Update/Updates
Peter Kasting 2017/03/01 02:39:11 Wouldn't one expect to find such comments on the b
Eugene But (OOO till 7-30) 2017/03/01 06:08:08 Oh, right. I missed that these are override method
elawrence 2017/03/01 21:49:02 Removed.
+ void SetEmphasis(bool emphasize, gfx::Range range) override;
+
+ // Update color and font for scheme in |attributing_display_string_|.
+ void UpdateSchemeEmphasis(gfx::Range scheme_range) override;
+
// Removes the query refinement chip from the omnibox.
void RemoveQueryRefinementChip();
@@ -168,6 +178,10 @@ class OmniboxViewIOS : public OmniboxView {
// Bridges delegate method calls from |field_| to C++ land.
base::scoped_nsobject<AutocompleteTextFieldDelegate> field_delegate_;
+
+ // Temporary pointer to the attributed display string, stored as color and
+ // other emphasis attributes are applied by the superclass.
+ NSMutableAttributedString* attributing_display_string_;
};
#endif // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_IOS_H_

Powered by Google App Engine
This is Rietveld 408576698