Chromium Code Reviews| 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 18 matching lines...) Expand all Loading... | |
| 29 profiles::BubbleViewMode mode, | 29 profiles::BubbleViewMode mode, |
| 30 Browser* browser, | 30 Browser* browser, |
| 31 signin_metrics::AccessPoint access_point); | 31 signin_metrics::AccessPoint access_point); |
| 32 | 32 |
| 33 static SigninViewControllerDelegate* CreateSyncConfirmationDelegate( | 33 static SigninViewControllerDelegate* CreateSyncConfirmationDelegate( |
| 34 SigninViewController* signin_view_controller, | 34 SigninViewController* signin_view_controller, |
| 35 Browser* browser); | 35 Browser* browser); |
| 36 | 36 |
| 37 void CloseModalSignin(); | 37 void CloseModalSignin(); |
| 38 | 38 |
| 39 // Either navigates back in the signin flow if the history state allows it or | |
| 40 // closes the flow otherwise. | |
| 41 void PerformNavigation(); | |
| 42 | |
| 43 // This will be called by the base class to request a resize of the native | |
| 44 // view hosting the content to |height|. | |
| 45 virtual void ResizeNativeView(int height) = 0; | |
|
sky
2016/04/04 15:04:02
Document units of height.
anthonyvd
2016/04/04 20:35:24
Done now on the base class.
| |
| 46 | |
| 39 protected: | 47 protected: |
| 40 SigninViewControllerDelegate(SigninViewController* signin_view_controller, | 48 SigninViewControllerDelegate(SigninViewController* signin_view_controller, |
| 41 content::WebContents* web_contents); | 49 content::WebContents* web_contents); |
| 42 ~SigninViewControllerDelegate() override; | 50 ~SigninViewControllerDelegate() override; |
| 43 | 51 |
| 44 // Notifies the SigninViewController that this instance is being deleted. | 52 // Notifies the SigninViewController that this instance is being deleted. |
| 45 void ResetSigninViewControllerDelegate(); | 53 void ResetSigninViewControllerDelegate(); |
| 46 | 54 |
| 47 // content::WebContentsDelegate | 55 // content::WebContentsDelegate |
| 48 void LoadingStateChanged(content::WebContents* source, | 56 void LoadingStateChanged(content::WebContents* source, |
| 49 bool to_different_document) override; | 57 bool to_different_document) override; |
| 50 | 58 |
| 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. | |
| 53 void HandleNavigationButtonClicked(const base::ListValue* args); | |
| 54 | |
| 55 // This will be called by this base class when the tab-modal window must be | 59 // 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 | 60 // closed. This should close the platform-specific window that is currently |
| 57 // showing the sign in flow or the sync confirmation dialog. | 61 // showing the sign in flow or the sync confirmation dialog. |
| 58 virtual void PerformClose() = 0; | 62 virtual void PerformClose() = 0; |
| 59 | 63 |
| 60 private: | 64 private: |
| 61 bool CanGoBack(content::WebContents* web_ui_web_contents) const; | 65 bool CanGoBack(content::WebContents* web_ui_web_contents) const; |
| 62 | 66 |
| 63 SigninViewController* signin_view_controller_; // Not owned. | 67 SigninViewController* signin_view_controller_; // Not owned. |
| 64 content::WebContents* web_contents_; // Not owned. | 68 content::WebContents* web_contents_; // Not owned. |
| 65 DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegate); | 69 DISALLOW_COPY_AND_ASSIGN(SigninViewControllerDelegate); |
| 66 }; | 70 }; |
| 67 | 71 |
| 68 #endif // CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ | 72 #endif // CHROME_BROWSER_UI_SIGNIN_VIEW_CONTROLLER_DELEGATE_H_ |
| OLD | NEW |