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

Unified Diff: chrome/browser/ui/sync/profile_signin_confirmation_helper.cc

Issue 14846020: Add Views implementation of ProfileSigninConfirmationDialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more nits Created 7 years, 7 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/ui/sync/profile_signin_confirmation_helper.cc
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
index 37e97bc01233af74406d197363f625968beacc83..a360a869846c2e4d72527ab93d9d637e67d55046 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
@@ -21,6 +21,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_set.h"
+#include "ui/gfx/color_utils.h"
+#include "ui/native_theme/native_theme.h"
// TODO(dconnelly): change VLOG to DVLOG (crbug.com/240195)
@@ -200,6 +202,17 @@ void ProfileSigninConfirmationHelper::ReturnResult(bool result) {
namespace ui {
+SkColor GetSigninConfirmationPromptBarColor(SkAlpha alpha) {
+ static const SkColor kBackgroundColor =
+ ui::NativeTheme::instance()->GetSystemColor(
+ ui::NativeTheme::kColorId_DialogBackground);
+ unsigned char background_luminance =
+ color_utils::GetLuminanceForColor(kBackgroundColor);
+ const SkColor blend_color =
+ background_luminance < 128 ? SK_ColorWHITE : SK_ColorBLACK;
+ return color_utils::AlphaBlend(blend_color, kBackgroundColor, alpha);
+}
+
bool HasBeenShutdown(Profile* profile) {
bool has_been_shutdown = !profile->IsNewProfile();
if (has_been_shutdown)

Powered by Google App Engine
This is Rietveld 408576698