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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.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 | « no previous file | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
index 18c18df08bfac0979d2a6ab525ac1e86d0e4c951..584494d0aa62a7cfc1f74ab7320ca7e7586793d1 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
@@ -32,6 +32,8 @@ class OmniboxViewMac : public OmniboxView,
public:
static SkColor BaseTextColorSkia(bool in_dark_mode);
static NSColor* BaseTextColor(bool in_dark_mode);
+ // Returns a color representing |security_level|, adjusted based on whether
+ // the browser is in Incognito mode.
static NSColor* GetSecureTextColor(
security_state::SecurityLevel security_level,
bool in_dark_mode);
@@ -180,9 +182,13 @@ class OmniboxViewMac : public OmniboxView,
void ApplyTextStyle(NSMutableAttributedString* attributedString);
// Calculates text attributes according to |display_text| and applies them
- // to the given |attributedString| object.
+ // to the given |attributed_string| object.
void ApplyTextAttributes(const base::string16& display_text,
- NSMutableAttributedString* attributedString);
+ NSMutableAttributedString* attributed_string);
+
+ // OmniboxView:
+ void SetEmphasis(bool emphasize, const gfx::Range& range) override;
+ void UpdateSchemeStyle(const gfx::Range& scheme_range) override;
// Return the number of UTF-16 units in the current buffer, excluding the
// suggested text.
@@ -231,6 +237,10 @@ class OmniboxViewMac : public OmniboxView,
// The time when OnBeforeDrawRect() was called.
base::TimeTicks draw_rect_start_time_;
+ // Temporary pointer to the attributed display string, stored as color and
+ // other emphasis attributes are applied by the superclass.
+ NSMutableAttributedString* attributing_display_string_; // weak
+
DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
};
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698