1// Copyright 2013 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_UI_SYNC_PROFILE_SIGNIN_CONFIRMATION_HELPER_H_
6#define CHROME_BROWSER_UI_SYNC_PROFILE_SIGNIN_CONFIRMATION_HELPER_H_
7
8#include "base/callback.h"
9#include "third_party/skia/include/core/SkColor.h"
10
11class Profile;
12
13namespace ui {
14
15// Blend parameters for the dialog prompt bar.
16const SkAlpha kSigninConfirmationPromptBarBackgroundAlpha = 0x0A;
17const SkAlpha kSigninConfirmationPromptBarBorderAlpha = 0x1F;
18
19// Create slightly different colors for the dialog prompt bar.
20SkColor GetSigninConfirmationPromptBarColor(SkAlpha alpha);
21
22// Determines whether the browser has ever been shutdown since the
23// profile was created.
24// Exposed for testing.
25bool HasBeenShutdown(Profile* profile);
26
27// Determines whether there are any synced extensions installed (that
28// shouldn't be ignored).
29// Exposed for testing.
30bool HasSyncedExtensions(Profile* profile);
31
32// Determines whether the user should be prompted to create a new
33// profile before signin.
34void CheckShouldPromptForNewProfile(
35    Profile* profile,
36    const base::Callback<void(bool)>& cb);
37
38// Handles user input from confirmation dialog.
39class ProfileSigninConfirmationDelegate {
40 public:
41  virtual void OnCancelSignin() = 0;
42  virtual void OnContinueSignin() = 0;
43  virtual void OnSigninWithNewProfile() = 0;
44};
45
46}  // namespace ui
47
48#endif  // CHROME_BROWSER_UI_SYNC_PROFILE_SIGNIN_CONFIRMATION_HELPER_H_
49