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 #include "chrome/browser/ui/signin_view_controller_delegate.h" | 5 #include "chrome/browser/ui/signin_view_controller_delegate.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/ui/signin_view_controller.h" | 9 #include "chrome/browser/ui/signin_view_controller.h" |
10 #include "chrome/browser/ui/webui/signin/get_auth_frame.h" | 10 #include "chrome/browser/ui/webui/signin/signin_utils.h" |
11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 content::WebContents* GetAuthFrameWebContents( | 15 content::WebContents* GetAuthFrameWebContents( |
16 content::WebContents* web_ui_web_contents) { | 16 content::WebContents* web_ui_web_contents) { |
17 return signin::GetAuthFrameWebContents(web_ui_web_contents, "signin-frame"); | 17 return signin::GetAuthFrameWebContents(web_ui_web_contents, "signin-frame"); |
18 } | 18 } |
19 | 19 |
20 } // namespace | 20 } // namespace |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 else | 64 else |
65 source->GetWebUI()->CallJavascriptFunctionUnsafe( | 65 source->GetWebUI()->CallJavascriptFunctionUnsafe( |
66 "inline.login.showCloseButton"); | 66 "inline.login.showCloseButton"); |
67 } | 67 } |
68 | 68 |
69 bool SigninViewControllerDelegate::CanGoBack( | 69 bool SigninViewControllerDelegate::CanGoBack( |
70 content::WebContents* web_ui_web_contents) const { | 70 content::WebContents* web_ui_web_contents) const { |
71 auto* auth_web_contents = GetAuthFrameWebContents(web_ui_web_contents); | 71 auto* auth_web_contents = GetAuthFrameWebContents(web_ui_web_contents); |
72 return auth_web_contents && auth_web_contents->GetController().CanGoBack(); | 72 return auth_web_contents && auth_web_contents->GetController().CanGoBack(); |
73 } | 73 } |
OLD | NEW |