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

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

Issue 66403006: Use embedded sign in UI for inline sign in flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add util function for appending param # Created 7 years, 1 month 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
OLDNEW
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 #include "chrome/browser/ui/views/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profile_chooser_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.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/profiles/profile_info_util.h" 10 #include "chrome/browser/profiles/profile_info_util.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 RemoveAllChildViews(true); 304 RemoveAllChildViews(true);
305 view_mode_ = view_to_display; 305 view_mode_ = view_to_display;
306 306
307 views::GridLayout* layout = CreateSingleColumnLayout(this); 307 views::GridLayout* layout = CreateSingleColumnLayout(this);
308 layout->set_minimum_size(gfx::Size(kMinMenuWidth, 0)); 308 layout->set_minimum_size(gfx::Size(kMinMenuWidth, 0));
309 309
310 if (view_to_display == GAIA_SIGNIN_VIEW || 310 if (view_to_display == GAIA_SIGNIN_VIEW ||
311 view_to_display == GAIA_ADD_ACCOUNT_VIEW) { 311 view_to_display == GAIA_ADD_ACCOUNT_VIEW) {
312 // Minimum size for embedded sign in pages as defined in Gaia. 312 // Minimum size for embedded sign in pages as defined in Gaia.
313 const int kMinGaiaViewWidth = 320; 313 const int kMinGaiaViewWidth = 320;
314 const int kMinGaiaViewHeight = 500; 314 const int kMinGaiaViewHeight = 440;
315 Profile* profile = browser_->profile(); 315 Profile* profile = browser_->profile();
316 views::WebView* web_view = new views::WebView(profile); 316 views::WebView* web_view = new views::WebView(profile);
317 signin::Source source = (view_to_display == GAIA_SIGNIN_VIEW) ? 317 signin::Source source = (view_to_display == GAIA_SIGNIN_VIEW) ?
318 signin::SOURCE_AVATAR_BUBBLE_SIGN_IN : 318 signin::SOURCE_AVATAR_BUBBLE_SIGN_IN :
319 signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT; 319 signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT;
320 web_view->LoadInitialURL(GURL(signin::GetPromoURL(source, false))); 320 web_view->LoadInitialURL(GURL(signin::GetPromoURL(source, false)));
321 layout->StartRow(1, 0); 321 layout->StartRow(1, 0);
322 layout->AddView(web_view); 322 layout->AddView(web_view);
323 layout->set_minimum_size( 323 layout->set_minimum_size(
324 gfx::Size(kMinGaiaViewWidth, kMinGaiaViewHeight)); 324 gfx::Size(kMinGaiaViewWidth, kMinGaiaViewHeight));
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 660 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
661 661
662 add_account_button_ = new views::BlueButton( 662 add_account_button_ = new views::BlueButton(
663 this, 663 this,
664 l10n_util::GetStringFUTF16(IDS_PROFILES_PROFILE_ADD_ACCOUNT_BUTTON, 664 l10n_util::GetStringFUTF16(IDS_PROFILES_PROFILE_ADD_ACCOUNT_BUTTON,
665 avatar_item.name)); 665 avatar_item.name));
666 layout->StartRow(1, 0); 666 layout->StartRow(1, 0);
667 layout->AddView(add_account_button_); 667 layout->AddView(add_account_button_);
668 return view; 668 return view;
669 } 669 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/gaia_auth_host/gaia_auth_host.js ('k') | chrome/browser/ui/webui/inline_login_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698