#ifndef ANDROID_WEBVIEW_NATIVE_AW_WEB_CONTENTS_DELEGATE_H_
#define ANDROID_WEBVIEW_NATIVE_AW_WEB_CONTENTS_DELEGATE_H_
#include <jni.h>
#include "components/web_contents_delegate_android/web_contents_delegate_android.h"
namespace android_webview {
class AwWebContentsDelegate
: public web_contents_delegate_android::WebContentsDelegateAndroid {
public:
AwWebContentsDelegate(JNIEnv* env, jobject obj);
virtual ~AwWebContentsDelegate();
virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager()
OVERRIDE;
virtual void FindReply(content::WebContents* web_contents,
int request_id,
int number_of_matches,
const gfx::Rect& selection_rect,
int active_match_ordinal,
bool final_update) OVERRIDE;
virtual void CanDownload(content::RenderViewHost* source,
int request_id,
const std::string& request_method,
const base::Callback<void(bool)>& callback) OVERRIDE;
virtual void RunFileChooser(
content::WebContents* web_contents,
const content::FileChooserParams& params) OVERRIDE;
virtual void AddNewContents(content::WebContents* source,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture,
bool* was_blocked) OVERRIDE;
virtual void WebContentsCreated(content::WebContents* source_contents,
int opener_render_frame_id,
const base::string16& frame_name,
const GURL& target_url,
content::WebContents* new_contents) OVERRIDE;
virtual void CloseContents(content::WebContents* source) OVERRIDE;
virtual void ActivateContents(content::WebContents* contents) OVERRIDE;
};
bool RegisterAwWebContentsDelegate(JNIEnv* env);
}
#endif