Chromium Code Reviews| 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..fc7ff9efb7dc4e9a7c6029b4429434bd2e785f40 100644 |
| --- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h |
| +++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h |
| @@ -10,6 +10,7 @@ |
| #include <memory> |
| +#include "base/auto_reset.h" |
| #include "base/gtest_prod_util.h" |
| #include "base/macros.h" |
| #include "base/strings/string16.h" |
| @@ -32,6 +33,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 +183,12 @@ 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); |
| + |
| + void SetEmphasis(bool emphasize, const gfx::Range& range) override; |
|
Peter Kasting
2017/03/03 02:31:08
Nit: Consider an "// OmniboxView:" header above th
elawrence
2017/03/03 16:07:42
Done.
|
| + 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); |
| }; |