| Index: android_webview/browser/aw_web_contents_view_delegate.h
|
| diff --git a/android_webview/browser/aw_web_contents_view_delegate.h b/android_webview/browser/aw_web_contents_view_delegate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4ded8bd12eef0f576569b42b8292f534c397029c
|
| --- /dev/null
|
| +++ b/android_webview/browser/aw_web_contents_view_delegate.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef ANDROID_WEBVIEW_BROWSER_AW_WEB_CONTENTS_VIEW_DELEGATE_H_
|
| +#define ANDROID_WEBVIEW_BROWSER_AW_WEB_CONTENTS_VIEW_DELEGATE_H_
|
| +
|
| +#include "content/public/browser/web_contents_view_delegate.h"
|
| +
|
| +#include "base/compiler_specific.h"
|
| +
|
| +namespace content {
|
| +class WebContents;
|
| +} // namespace content
|
| +
|
| +namespace android_webview {
|
| +
|
| +class AwContents;
|
| +
|
| +// This class is only used to create context menus on Android.
|
| +class AwWebContentsViewDelegate : public content::WebContentsViewDelegate {
|
| + public:
|
| + AwWebContentsViewDelegate(content::WebContents* web_contents);
|
| + virtual ~AwWebContentsViewDelegate();
|
| +
|
| + // content::WebContentsViewDelegate implementation.
|
| + virtual content::WebDragDestDelegate* GetDragDestDelegate() OVERRIDE;
|
| + virtual void ShowContextMenu(
|
| + const content::ContextMenuParams& params,
|
| + content::ContextMenuSourceType type) OVERRIDE;
|
| +
|
| + private:
|
| + // Weak pointer due to ownership graph:
|
| + // WebContents->WebContentsView->this.
|
| + content::WebContents* web_contents_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AwWebContentsViewDelegate);
|
| +};
|
| +
|
| +} // namespace android_webview
|
| +
|
| +
|
| +#endif // ANDROID_WEBVIEW_BROWSER_AW_WEB_CONTENTS_VIEW_DELEGATE_H_
|
|
|