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/chromeos/arc/arc_auth_ui.h" | 5 #include "chrome/browser/chromeos/arc/arc_auth_ui.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 7 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
8 #include "chrome/browser/ui/webui/chrome_web_contents_handler.h" | 8 #include "chrome/browser/ui/webui/chrome_web_contents_handler.h" |
9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 if (target_url_.GetOrigin() != current_url.GetOrigin() || | 91 if (target_url_.GetOrigin() != current_url.GetOrigin() || |
92 target_url_.path() != current_url.path()) { | 92 target_url_.path() != current_url.path()) { |
93 return; | 93 return; |
94 } | 94 } |
95 | 95 |
96 auth_fetcher_.reset( | 96 auth_fetcher_.reset( |
97 new ArcAuthFetcher(browser_context_->GetRequestContext(), this)); | 97 new ArcAuthFetcher(browser_context_->GetRequestContext(), this)); |
98 } | 98 } |
99 | 99 |
100 void ArcAuthUI::OnAuthCodeFetched(const std::string& auth_code) { | 100 void ArcAuthUI::OnAuthCodeFetched(const std::string& auth_code) { |
101 ArcAuthService::Get()->SetAuthCodeAndStartArc(auth_code); | 101 delegate_->OnAuthCodeFetchedFromUI(auth_code); |
102 } | 102 } |
103 | 103 |
104 void ArcAuthUI::OnAuthCodeNeedUI() {} | 104 void ArcAuthUI::OnAuthCodeNeedUI() {} |
105 | 105 |
106 void ArcAuthUI::OnAuthCodeFailed() {} | 106 void ArcAuthUI::OnAuthCodeFailed() {} |
107 | 107 |
108 } // namespace arc | 108 } // namespace arc |
OLD | NEW |