aw_http_auth_handler_base.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef ANDROID_WEBVIEW_BROWSER_AW_HTTP_AUTH_HANDLER_BASE_H_ 6#define ANDROID_WEBVIEW_BROWSER_AW_HTTP_AUTH_HANDLER_BASE_H_ 7 8namespace content { 9class WebContents; 10}; 11 12namespace net { 13class AuthChallengeInfo; 14}; 15 16namespace android_webview { 17 18class AwLoginDelegate; 19 20// browser/ layer interface for AwHttpAuthHandler (which is implemented in the 21// native/ layer as a native version of the Java class of the same name). This 22// allows the browser/ layer to be unaware of JNI/Java shenanigans. 23class AwHttpAuthHandlerBase { 24 public: 25 static AwHttpAuthHandlerBase* Create(AwLoginDelegate* login_delegate, 26 net::AuthChallengeInfo* auth_info); 27 virtual ~AwHttpAuthHandlerBase(); 28 29 // Provides an 'escape-hatch' out to Java for the browser/ layer 30 // AwLoginDelegate. 31 virtual void HandleOnUIThread(content::WebContents*) = 0; 32}; 33 34} // namespace android_webview 35 36#endif // ANDROID_WEBVIEW_BROWSER_AW_HTTP_AUTH_HANDLER_BASE_H_ 37