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

Side by Side 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: rebased 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/api/infobars/one_click_signin_infobar_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // A set of alternate colours for the experiment. The colour values are only
16 // used if |enabled| is true. Otherwise the infobar uses its default colours.
17 struct AlternateColors {
18 bool enabled;
19 SkColor infobar_top_color;
20 SkColor infobar_bottom_color;
21 SkColor button_text_color;
22 SkColor button_background_color;
23 SkColor button_border_color;
24 };
25
26 explicit OneClickSigninInfoBarDelegate(InfoBarService* infobar_service);
27 virtual ~OneClickSigninInfoBarDelegate();
28
29 // Returns the colours to use with the one click signin infobar. The colours
30 // depend on the experimental group.
31 virtual void GetAlternateColors(AlternateColors* alt_colors);
32
33 private:
34 #if defined(OS_WIN)
35 // Because the experiment is only running on windows, only override this
36 // function on that platform. Other platforms that support one-click sign in
37 // will create a regular confirm infobar with no support for colour changes.
38
39 // InfoBarDelegate:
40 virtual InfoBar* CreateInfoBar(InfoBarService* owner) OVERRIDE;
41 #endif
42
43 DISALLOW_COPY_AND_ASSIGN(OneClickSigninInfoBarDelegate);
44 };
45
46 #endif // CHROME_BROWSER_API_INFOBARS_ONE_CLICK_SIGNIN_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/api/infobars/one_click_signin_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698