| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/profile_chooser_constants.h" | 8 #include "chrome/browser/ui/profile_chooser_constants.h" |
| 9 #include "content/public/browser/web_contents_delegate.h" | 9 #include "content/public/browser/web_contents_delegate.h" |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Either navigates back in the signin flow if the history state allows it or | 39 // Either navigates back in the signin flow if the history state allows it or |
| 40 // closes the flow otherwise. | 40 // closes the flow otherwise. |
| 41 void PerformNavigation(); | 41 void PerformNavigation(); |
| 42 | 42 |
| 43 // This will be called by the base class to request a resize of the native | 43 // This will be called by the base class to request a resize of the native |
| 44 // view hosting the content to |height|. |height| is the total height of the | 44 // view hosting the content to |height|. |height| is the total height of the |
| 45 // content, in pixels. | 45 // content, in pixels. |
| 46 virtual void ResizeNativeView(int height) = 0; | 46 virtual void ResizeNativeView(int height) = 0; |
| 47 | 47 |
| 48 // content::WebContentsDelegate: |
| 49 bool HandleContextMenu(const content::ContextMenuParams& params) override; |
| 50 |
| 48 protected: | 51 protected: |
| 49 SigninViewControllerDelegate(SigninViewController* signin_view_controller, | 52 SigninViewControllerDelegate(SigninViewController* signin_view_controller, |
| 50 content::WebContents* web_contents); | 53 content::WebContents* web_contents); |
| 51 ~SigninViewControllerDelegate() override; | 54 ~SigninViewControllerDelegate() override; |
| 52 | 55 |
| 53 // Notifies the SigninViewController that this instance is being deleted. | 56 // Notifies the SigninViewController that this instance is being deleted. |
| 54 void ResetSigninViewControllerDelegate(); | 57 void ResetSigninViewControllerDelegate(); |
| 55 | 58 |
| 56 // content::WebContentsDelegate | 59 // content::WebContentsDelegate |
| 57 void LoadingStateChanged(content::WebContents* source, | 60 void LoadingStateChanged(content::WebContents* source, |
| 58 bool to_different_document) override; | 61 bool to_different_document) override; |
| 59 | 62 |
| 60 // This will be called by this base class when the tab-modal window must be | 63 // This will be called by this base class when the tab-modal window must be |
| 61 // closed. This should close the platform-specific window that is currently | 64 // closed. This should close the platform-specific window that is currently |
| 62 // showing the sign in flow or the sync confirmation dialog. | 65 // showing the sign in flow or the sync confirmation dialog. |
| 63 virtual void PerformClose() = 0; | 66 virtual void PerformClose() = 0; |
| 64 | 67 |
| 65 private: | 68 private: |
| 66 bool CanGoBack(content::WebContents* web_ui_web_contents) const; | 69 bool CanGoBack(content::WebContents* web_ui_web_contents) const; |
| 67 | 70 |
| 68 SigninViewController* signin_view_controller_; // Not owned. | 71 SigninViewController* signin_view_controller_; // Not owned. |
| 69 content::WebContents* web_contents_; // Not owned. | 72 content::WebContents* web_contents_; // Not owned. |
| 70 DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegate); | 73 DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegate); |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 #endif // CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ | 76 #endif // CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ |
| OLD | NEW |