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