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.
5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_WEB_CONTENTS_VIEW_DELEGATE_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_WEB_CONTENTS_VIEW_DELEGATE_H_
8 #include "content/public/browser/web_contents_view_delegate.h"
10 #include "base/macros.h"
14 } // namespace content
16 namespace android_webview
{
20 class AwWebContentsViewDelegate
: public content::WebContentsViewDelegate
{
22 static content::WebContentsViewDelegate
* Create(
23 content::WebContents
* web_contents
);
25 ~AwWebContentsViewDelegate() override
;
27 // content::WebContentsViewDelegate implementation.
28 content::WebDragDestDelegate
* GetDragDestDelegate() override
;
29 void ShowContextMenu(content::RenderFrameHost
* render_frame_host
,
30 const content::ContextMenuParams
& params
) override
;
33 AwWebContentsViewDelegate(content::WebContents
* web_contents
);
35 // Weak pointer due to ownership graph:
36 // WebContents->WebContentsView->this.
37 content::WebContents
* web_contents_
;
39 DISALLOW_COPY_AND_ASSIGN(AwWebContentsViewDelegate
);
42 } // namespace android_webview
45 #endif // ANDROID_WEBVIEW_NATIVE_AW_WEB_CONTENTS_VIEW_DELEGATE_H_