Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_API_INFOBARS_ONE_CLICK_SIGNIN_INFOBAR_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_API_INFOBARS_ONE_CLICK_SIGNIN_INFOBAR_DELEGATE_H_ | |
| 7 | |
| 8 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | |
| 9 #include "third_party/skia/include/core/SkColor.h" | |
| 10 | |
| 11 // An interface derived from ConfirmInfoBarDelegate implemented for the | |
| 12 // one-click sign in inforbar experiments. | |
| 13 class OneClickSigninInfoBarDelegate : public ConfirmInfoBarDelegate { | |
| 14 public: | |
| 15 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.
| |
| 16 | |
| 17 struct AlternateColors { | |
| 18 SkColor infobar_top_color; | |
| 19 SkColor infobar_bottom_color; | |
| 20 SkColor button_text_color; | |
| 21 SkColor button_background_color; | |
| 22 SkColor button_border_color; | |
| 23 }; | |
| 24 | |
| 25 explicit OneClickSigninInfoBarDelegate(InfoBarService* infobar_service); | |
| 26 virtual ~OneClickSigninInfoBarDelegate(); | |
| 27 | |
| 28 // Returns the colours to use with the one click signin infobar. The colours | |
| 29 // depend on the experimental group. | |
| 30 virtual void GetAlternateColors(AlternateColors* alt_colors); | |
| 31 | |
| 32 private: | |
| 33 #if defined(OS_WIN) | |
| 34 // Because the experiment is only running on windows, only override this | |
| 35 // function on that platform. Other platforms that support one-click sign in | |
| 36 // will create a regular confirm infobar with no support for colour changes. | |
| 37 | |
| 38 // InfoBarDelegate: | |
| 39 virtual InfoBar* CreateInfoBar(InfoBarService* owner) OVERRIDE; | |
| 40 #endif | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(OneClickSigninInfoBarDelegate); | |
| 43 }; | |
| 44 | |
| 45 #endif // CHROME_BROWSER_API_INFOBARS_ONE_CLICK_SIGNIN_INFOBAR_DELEGATE_H_ | |
| OLD | NEW |