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

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: Move misplaced #include to mm files 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
« no previous file with comments | « components/omnibox/browser/omnibox_view.cc ('k') | ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ff880426bcb8da73cbd246157003590afcd4a232 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_view_ios.h
+++ b/ios/chrome/browser/ui/omnibox/omnibox_view_ios.h
@@ -8,7 +8,6 @@
#import <UIKit/UIKit.h>
#include <memory>
-
#include "base/mac/scoped_nsobject.h"
#include "components/omnibox/browser/omnibox_view.h"
#include "components/toolbar/toolbar_model.h"
@@ -40,6 +39,12 @@ class OmniboxViewIOS : public OmniboxView {
id<OmniboxPopupPositioner> positioner);
~OmniboxViewIOS() override;
+ // Returns a color representing |security_level|, adjusted based on whether
+ // the browser is in Incognito mode.
+ static UIColor* GetSecureTextColor(
+ security_state::SecurityLevel security_level,
+ bool in_dark_mode);
+
// OmniboxView implementation.
void OpenMatch(const AutocompleteMatch& match,
WindowOpenDisposition disposition,
@@ -137,6 +142,9 @@ class OmniboxViewIOS : public OmniboxView {
// returns them in an autoreleased object.
NSAttributedString* ApplyTextAttributes(const base::string16& text);
+ void SetEmphasis(bool emphasize, const gfx::Range& range) override;
+ void UpdateSchemeStyle(const gfx::Range& scheme_range) override;
+
// Removes the query refinement chip from the omnibox.
void RemoveQueryRefinementChip();
@@ -168,6 +176,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_; // weak
};
#endif // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_IOS_H_
« no previous file with comments | « components/omnibox/browser/omnibox_view.cc ('k') | ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698