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

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

Issue 1207313003: Allow cert-popup for WebView guests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 default: 1530 default:
1531 NOTREACHED() << "Called with invalid mode=" << view_mode_; 1531 NOTREACHED() << "Called with invalid mode=" << view_mode_;
1532 return NULL; 1532 return NULL;
1533 } 1533 }
1534 1534
1535 // Adds Gaia signin webview 1535 // Adds Gaia signin webview
1536 Profile* profile = browser_->profile(); 1536 Profile* profile = browser_->profile();
1537 views::WebView* web_view = new views::WebView(profile); 1537 views::WebView* web_view = new views::WebView(profile);
1538 web_view->LoadInitialURL(url); 1538 web_view->LoadInitialURL(url);
1539 web_view->GetWebContents()->SetDelegate(this); 1539 web_view->GetWebContents()->SetDelegate(this);
1540
1541 // TODO(davidben): When crbug.com/456255 is resolved, presumably we won't
1542 // need a popup manager and the following code can be removed.
1543 // It probably makes more sense for a cert-selection dialog in the signin
1544 // bubble to be browser-modal, and not bubble-modal.
Ryan Sleevi 2015/07/07 12:27:19 I'm not sure what you mean by browser-modal here -
1545 if (!popup_manager_)
1546 popup_manager_.reset(new web_modal::PopupManager(nullptr));
1547 popup_manager_->RegisterWith(web_view->GetWebContents());
1548
1540 web_view->SetPreferredSize( 1549 web_view->SetPreferredSize(
1541 gfx::Size(kFixedGaiaViewWidth, kFixedGaiaViewHeight)); 1550 gfx::Size(kFixedGaiaViewWidth, kFixedGaiaViewHeight));
1542 content::RenderWidgetHostView* rwhv = 1551 content::RenderWidgetHostView* rwhv =
1543 web_view->GetWebContents()->GetRenderWidgetHostView(); 1552 web_view->GetWebContents()->GetRenderWidgetHostView();
1544 if (rwhv) 1553 if (rwhv)
1545 rwhv->SetBackgroundColor(profiles::kAvatarBubbleGaiaBackgroundColor); 1554 rwhv->SetBackgroundColor(profiles::kAvatarBubbleGaiaBackgroundColor);
1546 TitleCard* title_card = new TitleCard(l10n_util::GetStringUTF16(message_id), 1555 TitleCard* title_card = new TitleCard(l10n_util::GetStringUTF16(message_id),
1547 this, 1556 this,
1548 &gaia_signin_cancel_button_); 1557 &gaia_signin_cancel_button_);
1549 if (signin_content_view) 1558 if (signin_content_view)
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1756 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1748 IncognitoModePrefs::DISABLED; 1757 IncognitoModePrefs::DISABLED;
1749 return incognito_available && !browser_->profile()->IsGuestSession(); 1758 return incognito_available && !browser_->profile()->IsGuestSession();
1750 } 1759 }
1751 1760
1752 void ProfileChooserView::PostActionPerformed( 1761 void ProfileChooserView::PostActionPerformed(
1753 ProfileMetrics::ProfileDesktopMenu action_performed) { 1762 ProfileMetrics::ProfileDesktopMenu action_performed) {
1754 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 1763 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
1755 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 1764 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
1756 } 1765 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.h ('k') | chrome/browser/ui/views/ssl_client_certificate_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698