| OLD | NEW |
| (Empty) |
| 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_NATIVE_AW_WEB_CONTENTS_VIEW_DELEGATE_H_ | |
| 6 #define ANDROID_WEBVIEW_NATIVE_AW_WEB_CONTENTS_VIEW_DELEGATE_H_ | |
| 7 | |
| 8 #include "content/public/browser/web_contents_view_delegate.h" | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 | |
| 12 namespace content { | |
| 13 class WebContents; | |
| 14 } // namespace content | |
| 15 | |
| 16 namespace android_webview { | |
| 17 | |
| 18 class AwWebContentsViewDelegate : public content::WebContentsViewDelegate { | |
| 19 public: | |
| 20 static content::WebContentsViewDelegate* Create( | |
| 21 content::WebContents* web_contents); | |
| 22 | |
| 23 ~AwWebContentsViewDelegate() override; | |
| 24 | |
| 25 // content::WebContentsViewDelegate implementation. | |
| 26 content::WebDragDestDelegate* GetDragDestDelegate() override; | |
| 27 void ShowContextMenu(content::RenderFrameHost* render_frame_host, | |
| 28 const content::ContextMenuParams& params) override; | |
| 29 | |
| 30 private: | |
| 31 AwWebContentsViewDelegate(content::WebContents* web_contents); | |
| 32 | |
| 33 // Weak pointer due to ownership graph: | |
| 34 // WebContents->WebContentsView->this. | |
| 35 content::WebContents* web_contents_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(AwWebContentsViewDelegate); | |
| 38 }; | |
| 39 | |
| 40 } // namespace android_webview | |
| 41 | |
| 42 | |
| 43 #endif // ANDROID_WEBVIEW_NATIVE_AW_WEB_CONTENTS_VIEW_DELEGATE_H_ | |
| OLD | NEW |