Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: chrome/browser/ui/signin_view_controller_delegate.cc

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/get_auth_frame.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 content::WebContents* web_ui_web_contents) const { 45 content::WebContents* web_ui_web_contents) const {
46 auto auth_web_contents = GetAuthFrameWebContents(web_ui_web_contents); 46 auto auth_web_contents = GetAuthFrameWebContents(web_ui_web_contents);
47 return auth_web_contents && auth_web_contents->GetController().CanGoBack(); 47 return auth_web_contents && auth_web_contents->GetController().CanGoBack();
48 } 48 }
49 49
50 // content::WebContentsDelegate 50 // content::WebContentsDelegate
51 void SigninViewControllerDelegate::LoadingStateChanged( 51 void SigninViewControllerDelegate::LoadingStateChanged(
52 content::WebContents* source, 52 content::WebContents* source,
53 bool to_different_document) { 53 bool to_different_document) {
54 if (CanGoBack(source)) 54 if (CanGoBack(source))
55 source->GetWebUI()->CallJavascriptFunction("inline.login.showBackButton"); 55 source->GetWebUI()->CallJavascriptFunctionUnsafe(
56 "inline.login.showBackButton");
56 else 57 else
57 source->GetWebUI()->CallJavascriptFunction("inline.login.showCloseButton"); 58 source->GetWebUI()->CallJavascriptFunctionUnsafe(
59 "inline.login.showCloseButton");
58 } 60 }
59 61
60 void SigninViewControllerDelegate::PerformNavigation() { 62 void SigninViewControllerDelegate::PerformNavigation() {
61 if (CanGoBack(web_contents_)) { 63 if (CanGoBack(web_contents_)) {
62 auto auth_web_contents = GetAuthFrameWebContents(web_contents_); 64 auto auth_web_contents = GetAuthFrameWebContents(web_contents_);
63 auth_web_contents->GetController().GoBack(); 65 auth_web_contents->GetController().GoBack();
64 } else { 66 } else {
65 CloseModalSignin(); 67 CloseModalSignin();
66 } 68 }
67 } 69 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.cc ('k') | chrome/browser/ui/webui/app_launcher_login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698