| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 void ResetSigninViewControllerDelegate(); | 45 void ResetSigninViewControllerDelegate(); |
| 46 | 46 |
| 47 // content::WebContentsDelegate | 47 // content::WebContentsDelegate |
| 48 void LoadingStateChanged(content::WebContents* source, | 48 void LoadingStateChanged(content::WebContents* source, |
| 49 bool to_different_document) override; | 49 bool to_different_document) override; |
| 50 | 50 |
| 51 // Handles the web ui message sent when the navigation button is clicked by | 51 // Handles the web ui message sent when the navigation button is clicked by |
| 52 // the user, requesting either a back navigation or closing the dialog. | 52 // the user, requesting either a back navigation or closing the dialog. |
| 53 void HandleNavigationButtonClicked(const base::ListValue* args); | 53 void HandleNavigationButtonClicked(const base::ListValue* args); |
| 54 | 54 |
| 55 // Handles the web ui message sent when the html content is done being laid |
| 56 // out and it's time to resize the native view hosting it to fit. |args| is |
| 57 // a single integer value for the height the native view should resize to. |
| 58 void HandleResizeNativeView(const base::ListValue* args); |
| 59 |
| 55 // This will be called by this base class when the tab-modal window must be | 60 // This will be called by this base class when the tab-modal window must be |
| 56 // closed. This should close the platform-specific window that is currently | 61 // closed. This should close the platform-specific window that is currently |
| 57 // showing the sign in flow or the sync confirmation dialog. | 62 // showing the sign in flow or the sync confirmation dialog. |
| 58 virtual void PerformClose() = 0; | 63 virtual void PerformClose() = 0; |
| 59 | 64 |
| 65 // This will be called by the base class to request a resize of the native |
| 66 // view hosting the content to |height|. |
| 67 virtual void ResizeNativeView(int height) = 0; |
| 68 |
| 60 private: | 69 private: |
| 61 bool CanGoBack(content::WebContents* web_ui_web_contents) const; | 70 bool CanGoBack(content::WebContents* web_ui_web_contents) const; |
| 62 | 71 |
| 63 SigninViewController* signin_view_controller_; // Not owned. | 72 SigninViewController* signin_view_controller_; // Not owned. |
| 64 content::WebContents* web_contents_; // Not owned. | 73 content::WebContents* web_contents_; // Not owned. |
| 65 DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegate); | 74 DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegate); |
| 66 }; | 75 }; |
| 67 | 76 |
| 68 #endif // CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ | 77 #endif // CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ |
| OLD | NEW |