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

Unified Diff: chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h

Issue 1814513002: Fix sizing issues in the tab modal signin flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 years, 8 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/views/profiles/signin_view_controller_delegate_views.h
diff --git a/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h b/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h
index b36c3d93efde785b11fb7e61482c5589a24aa3b0..277cf77552021bb42d5720d1fd3868bb1f5b40dd 100644
--- a/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h
+++ b/chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h
@@ -32,10 +32,14 @@ class WebView;
class SigninViewControllerDelegateViews : public views::DialogDelegateView,
public SigninViewControllerDelegate {
public:
+ // Creates and displays a constrained window containing |web_contents|. If
+ // |wait_for_size| is true, the delegate will wait for ResizeNativeView() to
+ // be called by the base class before displaying the constrained window.
SigninViewControllerDelegateViews(
SigninViewController* signin_view_controller,
views::WebView* content_view,
- Browser* browser);
+ Browser* browser,
+ bool wait_for_size);
// Creates the web view that contains the signin flow in |mode| using
// |profile| as the web content's profile, then sets |delegate| as the created
@@ -59,12 +63,21 @@ class SigninViewControllerDelegateViews : public views::DialogDelegateView,
private:
void PerformClose() override;
+ void ResizeNativeView(int height) override;
+
+ void DisplayModal();
~SigninViewControllerDelegateViews() override;
views::WebView* content_view_;
views::Widget* modal_signin_widget_; // Not owned.
+ // wait_for_size_ stores whether the dialog should only be shown after its
+ // content's size has been laid out and measured so that the constrained
+ // window is sized to the content.
+ bool wait_for_size_;
+ Browser* browser_;
+
DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegateViews);
};

Powered by Google App Engine
This is Rietveld 408576698