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

Unified Diff: chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.h

Issue 2603493003: Close the email confirmation dialog when its web contents are killed. (Closed)
Patch Set: Fix compile 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/webui/signin/signin_email_confirmation_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.h
diff --git a/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.h b/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.h
index e47d102a6a9daa6fead44757743a2f813f0e1478..353cd21cbcff78531bf5d3c29dc7d995e96805a4 100644
--- a/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.h
+++ b/chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.h
@@ -46,6 +46,8 @@ class SigninEmailConfirmationDialog : public ui::WebDialogDelegate {
const Callback& callback);
private:
+ class DialogWebContentsObserver;
+
SigninEmailConfirmationDialog(content::WebContents* contents,
Profile* profile,
const std::string& last_email,
@@ -68,7 +70,17 @@ class SigninEmailConfirmationDialog : public ui::WebDialogDelegate {
// Shows the dialog and releases ownership of this object. It will
// delete itself when the dialog is closed.
- void Show();
+ void ShowDialog();
+
+ // Closes the dialog.
+ void CloseDialog();
+
+ // Resets the dialog observer.
+ void ResetDialogObserver();
+
+ // Returns the media router dialog WebContents.
+ // Returns nullptr if there is no dialog.
+ content::WebContents* GetDialogWebContents() const;
// Web contents from which the "Learn more" link should be opened.
content::WebContents* const web_contents_;
@@ -78,8 +90,8 @@ class SigninEmailConfirmationDialog : public ui::WebDialogDelegate {
std::string new_email_;
Callback callback_;
- // Weak pointer to the dialog delegate.
- ConstrainedWebDialogDelegate* dialog_delegate_;
+ // Observer for lifecycle events of the web contents of the dialog.
+ std::unique_ptr<DialogWebContentsObserver> dialog_observer_;
DISALLOW_COPY_AND_ASSIGN(SigninEmailConfirmationDialog);
};
« no previous file with comments | « no previous file | chrome/browser/ui/webui/signin/signin_email_confirmation_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698