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

Unified Diff: chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.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/cocoa/profiles/signin_view_controller_delegate_mac.h
diff --git a/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h b/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h
index b1e9c1291b8a8403aa7ea6bbb21ec70f1255e912..7c4cfedad5840bd11a520b02d305cb83d482cdec 100644
--- a/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h
+++ b/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h
@@ -33,17 +33,16 @@ enum class AccessPoint;
class SigninViewControllerDelegateMac : public ConstrainedWindowMacDelegate,
public SigninViewControllerDelegate {
public:
+ // Creates and displays a constrained window off of |host_web_contents|,
+ // 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. Otherwise, the window's dimensions will
+ // be |frame|.
SigninViewControllerDelegateMac(SigninViewController* signin_view_controller,
scoped_ptr<content::WebContents> web_contents,
content::WebContents* host_web_contents,
- NSRect frame);
-
- static
- SigninViewControllerDelegateMac* CreateModalSigninDelegateWithNavigation(
- SigninViewController* signin_view_controller,
- scoped_ptr<content::WebContents> web_contents,
- content::WebContents* host_web_contents,
- NSRect frame);
+ NSRect frame,
+ bool wait_for_size);
void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override;
@@ -61,13 +60,30 @@ class SigninViewControllerDelegateMac : public ConstrainedWindowMacDelegate,
private:
void PerformClose() override;
+ void ResizeNativeView(int height) override;
+
+ void DisplayModal();
~SigninViewControllerDelegateMac() override;
+ // The constrained window opened by this delegate to display signin flow
+ // content.
scoped_ptr<ConstrainedWindowMac> constrained_window_;
+
+ // The web contents displayed in the constrained window.
scoped_ptr<content::WebContents> web_contents_;
base::scoped_nsobject<ConstrainedWindowCustomWindow> window_;
+ // 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_;
+
+ // The web contents that the constrained window is displayed off of.
+ // Typically, this is going to be the active tab when the window is shown.
+ content::WebContents* host_web_contents_;
+ NSRect window_frame_;
+
DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegateMac);
};
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698