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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 654123004: Revert of Sets the default background color of inline signin and user manager to grey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/lifetime/application_lifetime.h" 10 #include "chrome/browser/lifetime/application_lifetime.h"
(...skipping 21 matching lines...) Expand all
32 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 32 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
33 #include "chrome/common/pref_names.h" 33 #include "chrome/common/pref_names.h"
34 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
35 #include "chrome/grit/chromium_strings.h" 35 #include "chrome/grit/chromium_strings.h"
36 #include "chrome/grit/generated_resources.h" 36 #include "chrome/grit/generated_resources.h"
37 #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h" 37 #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h"
38 #include "components/signin/core/browser/profile_oauth2_token_service.h" 38 #include "components/signin/core/browser/profile_oauth2_token_service.h"
39 #include "components/signin/core/browser/signin_error_controller.h" 39 #include "components/signin/core/browser/signin_error_controller.h"
40 #include "components/signin/core/browser/signin_manager.h" 40 #include "components/signin/core/browser/signin_manager.h"
41 #include "components/signin/core/common/profile_management_switches.h" 41 #include "components/signin/core/common/profile_management_switches.h"
42 #include "content/public/browser/render_widget_host_view.h"
43 #include "grit/theme_resources.h" 42 #include "grit/theme_resources.h"
44 #include "third_party/skia/include/core/SkColor.h" 43 #include "third_party/skia/include/core/SkColor.h"
45 #include "ui/base/l10n/l10n_util.h" 44 #include "ui/base/l10n/l10n_util.h"
46 #include "ui/base/resource/resource_bundle.h" 45 #include "ui/base/resource/resource_bundle.h"
47 #include "ui/gfx/canvas.h" 46 #include "ui/gfx/canvas.h"
48 #include "ui/gfx/image/image.h" 47 #include "ui/gfx/image/image.h"
49 #include "ui/gfx/image/image_skia.h" 48 #include "ui/gfx/image/image_skia.h"
50 #include "ui/gfx/path.h" 49 #include "ui/gfx/path.h"
51 #include "ui/gfx/skia_util.h" 50 #include "ui/gfx/skia_util.h"
52 #include "ui/gfx/text_elider.h" 51 #include "ui/gfx/text_elider.h"
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 NOTREACHED() << "Called with invalid mode=" << view_mode_; 1439 NOTREACHED() << "Called with invalid mode=" << view_mode_;
1441 return NULL; 1440 return NULL;
1442 } 1441 }
1443 1442
1444 // Adds Gaia signin webview 1443 // Adds Gaia signin webview
1445 Profile* profile = browser_->profile(); 1444 Profile* profile = browser_->profile();
1446 views::WebView* web_view = new views::WebView(profile); 1445 views::WebView* web_view = new views::WebView(profile);
1447 web_view->LoadInitialURL(url); 1446 web_view->LoadInitialURL(url);
1448 web_view->SetPreferredSize( 1447 web_view->SetPreferredSize(
1449 gfx::Size(kFixedGaiaViewWidth, kFixedGaiaViewHeight)); 1448 gfx::Size(kFixedGaiaViewWidth, kFixedGaiaViewHeight));
1450 content::RenderWidgetHostView* rwhv = 1449
1451 web_view->GetWebContents()->GetRenderWidgetHostView();
1452 if (rwhv)
1453 rwhv->SetBackgroundColor(profiles::kAvatarBubbleGaiaBackgroundColor);
1454 TitleCard* title_card = new TitleCard(l10n_util::GetStringUTF16(message_id), 1450 TitleCard* title_card = new TitleCard(l10n_util::GetStringUTF16(message_id),
1455 this, 1451 this,
1456 &gaia_signin_cancel_button_); 1452 &gaia_signin_cancel_button_);
1457 return TitleCard::AddPaddedTitleCard( 1453 return TitleCard::AddPaddedTitleCard(
1458 web_view, title_card, kFixedGaiaViewWidth); 1454 web_view, title_card, kFixedGaiaViewWidth);
1459 } 1455 }
1460 1456
1461 views::View* ProfileChooserView::CreateAccountRemovalView() { 1457 views::View* ProfileChooserView::CreateAccountRemovalView() {
1462 views::View* view = new views::View(); 1458 views::View* view = new views::View();
1463 views::GridLayout* layout = CreateSingleColumnLayout( 1459 views::GridLayout* layout = CreateSingleColumnLayout(
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1650 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1655 IncognitoModePrefs::DISABLED; 1651 IncognitoModePrefs::DISABLED;
1656 return incognito_available && !browser_->profile()->IsGuestSession(); 1652 return incognito_available && !browser_->profile()->IsGuestSession();
1657 } 1653 }
1658 1654
1659 void ProfileChooserView::PostActionPerformed( 1655 void ProfileChooserView::PostActionPerformed(
1660 ProfileMetrics::ProfileDesktopMenu action_performed) { 1656 ProfileMetrics::ProfileDesktopMenu action_performed) {
1661 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 1657 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
1662 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 1658 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
1663 } 1659 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/user_manager_mac.mm ('k') | chrome/browser/ui/views/profiles/user_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698