Chromium Code Reviews| Index: chrome/browser/ui/user_manager.h |
| diff --git a/chrome/browser/ui/user_manager.h b/chrome/browser/ui/user_manager.h |
| index 614e5c6dac01f43e458e08ae94ce7ae2517a14da..f60629166f18228dd64b3fb2973f95ee97cb72b6 100644 |
| --- a/chrome/browser/ui/user_manager.h |
| +++ b/chrome/browser/ui/user_manager.h |
| @@ -9,6 +9,7 @@ |
| #include "base/macros.h" |
| #include "chrome/browser/profiles/profile_window.h" |
| #include "components/signin/core/browser/signin_metrics.h" |
| +#include "content/public/browser/web_contents_delegate.h" |
| namespace base { |
| class FilePath; |
| @@ -69,24 +70,26 @@ class UserManager { |
| static const int kReauthDialogHeight = 512; |
| static const int kReauthDialogWidth = 448; |
| - // This class observes the WebUI used in the UserManager to perform online |
| - // reauthentication of locked profiles. It is concretely implemented in |
| - // UserManagerMac and UserManagerView to specialize the closing of the UI's |
| - // dialog widget. |
| - class ReauthDialogObserver : public content::WebContentsObserver { |
| + // Abstract base class for performing online reauthentication of profiles in |
| + // the User Manager. It is concretely implemented in UserManagerMac and |
| + // UserManagerView to specialize the closing of the UI's dialog widgets. |
| + class BaseReauthDialogDelegate : public content::WebContentsDelegate { |
| public: |
| - ReauthDialogObserver(content::WebContents* web_contents, |
| - const std::string& email_address); |
| + explicit BaseReauthDialogDelegate(content::WebContents* web_contents); |
| - private: |
| - // content::WebContentsObserver: |
| - void DidStopLoading() override; |
| + // content::WebContentsDelegate: |
| + bool HandleContextMenu(const content::ContextMenuParams& params) override; |
|
sky
2016/07/22 22:29:01
Have you considered leaving this class as is and m
Moe
2016/07/22 23:56:56
Unfortunately that alone won't work. The logic tha
|
| + |
| + // content::WebContentsDelegate: |
| + void LoadingStateChanged(content::WebContents* source, |
| + bool to_different_document) override; |
| + private: |
| virtual void CloseReauthDialog() = 0; |
| - const std::string email_address_; |
| + content::WebContents* web_contents_; |
| - DISALLOW_COPY_AND_ASSIGN(ReauthDialogObserver); |
| + DISALLOW_COPY_AND_ASSIGN(BaseReauthDialogDelegate); |
| }; |
| private: |