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