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

Unified Diff: chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h

Issue 1718563002: Convert location bar decorations to Material Design (Mac). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md_toolbar
Patch Set: Ready for review. Created 4 years, 9 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: chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h
diff --git a/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h b/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h
index 7301018b288d4f610cd7416627eba725bf5ec0fc..7275dee2be0dc7f672db45d0472833e538a01bc8 100644
--- a/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h
@@ -20,6 +20,10 @@ class SaveCreditCardDecoration : public ImageDecoration {
explicit SaveCreditCardDecoration(CommandUpdater* command_updater);
~SaveCreditCardDecoration() override;
+ // Sets up the SaveCreditCardDecoration's icon, which can't be set without
+ // knowing the window's theme.
+ void SetIcon(bool locationBarIsDark);
+
// LocationBarDecoration implementation:
bool AcceptsMousePress() override;
bool OnMousePressed(NSRect frame, NSPoint location) override;
@@ -30,6 +34,9 @@ class SaveCreditCardDecoration : public ImageDecoration {
// For showing the save credit card bubble.
CommandUpdater* command_updater_; // Weak, owned by Browser.
+ // true if the SaveCreditCardDecoration's icon has been initialized.
+ bool icon_initialized_;
+
DISALLOW_COPY_AND_ASSIGN(SaveCreditCardDecoration);
};

Powered by Google App Engine
This is Rietveld 408576698