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

Unified Diff: chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h

Issue 2617583006: Using native sheet to display modal dialogs for sign in (Closed)
Patch Set: Rebase Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ec5bf71f21058f3915e7f18655b706cee0bc53c7..4823853af5429a8a958fa6975f184825db7f9a0b 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
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
#include "chrome/browser/ui/profile_chooser_constants.h"
#include "chrome/browser/ui/signin_view_controller_delegate.h"
+#include "ui/base/ui_base_types.h"
@class ConstrainedWindowCustomWindow;
class ConstrainedWindowMac;
@@ -33,17 +34,6 @@ enum class AccessPoint;
class SigninViewControllerDelegateMac : public ConstrainedWindowMacDelegate,
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.
- // Otherwise, the window's dimensions will be |frame|.
- SigninViewControllerDelegateMac(
- SigninViewController* signin_view_controller,
- std::unique_ptr<content::WebContents> web_contents,
- Browser* browser,
- NSRect frame,
- bool wait_for_size);
-
void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override;
// Creates the web view that contains the signin flow in |mode| using
@@ -62,6 +52,21 @@ class SigninViewControllerDelegateMac : public ConstrainedWindowMacDelegate,
Profile* profile);
private:
+ friend SigninViewControllerDelegate;
+
+ // 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.
+ // Otherwise, the window's dimensions will be |frame|.
+ SigninViewControllerDelegateMac(
+ SigninViewController* signin_view_controller,
+ std::unique_ptr<content::WebContents> web_contents,
+ Browser* browser,
+ NSRect frame,
+ ui::ModalType dialog_modal_type,
+ bool wait_for_size);
+ ~SigninViewControllerDelegateMac() override;
+
void PerformClose() override;
void ResizeNativeView(int height) override;
@@ -71,7 +76,8 @@ class SigninViewControllerDelegateMac : public ConstrainedWindowMacDelegate,
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
- ~SigninViewControllerDelegateMac() override;
+ // Cleans up and deletes this object.
+ void CleanupAndDeleteThis();
// The constrained window opened by this delegate to display signin flow
// content.
@@ -88,6 +94,9 @@ class SigninViewControllerDelegateMac : public ConstrainedWindowMacDelegate,
Browser* browser_;
+ // The dialog modal presentation type.
+ ui::ModalType dialog_modal_type_;
+
NSRect window_frame_;
DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegateMac);
« no previous file with comments | « no previous file | 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