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

Unified Diff: chrome/browser/api/infobars/one_click_signin_infobar_delegate.h

Issue 10911169: Setup field trial for one-click signin inforbar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Steve's review comments Created 8 years, 3 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/api/infobars/one_click_signin_infobar_delegate.h
diff --git a/chrome/browser/api/infobars/one_click_signin_infobar_delegate.h b/chrome/browser/api/infobars/one_click_signin_infobar_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..6816a96339b7822e25ccb1950e9792772466d09e
--- /dev/null
+++ b/chrome/browser/api/infobars/one_click_signin_infobar_delegate.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_API_INFOBARS_ONE_CLICK_SIGNIN_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_API_INFOBARS_ONE_CLICK_SIGNIN_INFOBAR_DELEGATE_H_
+
+#include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
+#include "third_party/skia/include/core/SkColor.h"
+
+// An interface derived from ConfirmInfoBarDelegate implemented for the
+// one-click sign in inforbar experiments.
+class OneClickSigninInfoBarDelegate : public ConfirmInfoBarDelegate {
+ public:
+ static const SkColor kDefaultColor;
Peter Kasting 2012/09/11 23:02:07 Nit: If your intent is always to either change all
Roger Tawa OOO till Jul 10th 2012/09/12 15:07:14 Done.
+
+ struct AlternateColors {
+ SkColor infobar_top_color;
+ SkColor infobar_bottom_color;
+ SkColor button_text_color;
+ SkColor button_background_color;
+ SkColor button_border_color;
+ };
+
+ explicit OneClickSigninInfoBarDelegate(InfoBarService* infobar_service);
+ virtual ~OneClickSigninInfoBarDelegate();
+
+ // Returns the colours to use with the one click signin infobar. The colours
+ // depend on the experimental group.
+ virtual void GetAlternateColors(AlternateColors* alt_colors);
+
+ private:
+#if defined(OS_WIN)
+ // Because the experiment is only running on windows, only override this
+ // function on that platform. Other platforms that support one-click sign in
+ // will create a regular confirm infobar with no support for colour changes.
+
+ // InfoBarDelegate:
+ virtual InfoBar* CreateInfoBar(InfoBarService* owner) OVERRIDE;
+#endif
+
+ DISALLOW_COPY_AND_ASSIGN(OneClickSigninInfoBarDelegate);
+};
+
+#endif // CHROME_BROWSER_API_INFOBARS_ONE_CLICK_SIGNIN_INFOBAR_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698