Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5757)

Unified Diff: chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h

Issue 10803010: Upstream TabAndroid abstract class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@os_compat
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h
diff --git a/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h b/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..04314cb8ec2175c081b820f9c0bda6313758c540
--- /dev/null
+++ b/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h
@@ -0,0 +1,39 @@
+// 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 CHROME_BROWSER_UI_ANDROID_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_ANDROID_H_
+#define CHROME_BROWSER_UI_ANDROID_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_ANDROID_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "content/public/browser/web_contents_view_delegate.h"
+
+namespace content {
+class WebContents;
+}
+
+// A Chrome specific class that extends WebContentsViewAndroid with features
+// like context menus.
+class ChromeWebContentsViewDelegateAndroid
+ : public content::WebContentsViewDelegate {
+ public:
+ explicit ChromeWebContentsViewDelegateAndroid(
+ content::WebContents* web_contents);
+ virtual ~ChromeWebContentsViewDelegateAndroid();
+
+ // WebContentsViewDelegate:
+ virtual void ShowContextMenu(
+ const content::ContextMenuParams& params) OVERRIDE;
+
+ // WebContentsViewDelegate:
+ virtual content::WebDragDestDelegate* GetDragDestDelegate() OVERRIDE;
+
+ private:
+ // The WebContents that owns the view and this delegate transitively.
+ content::WebContents* web_contents_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateAndroid);
+};
+
+#endif // CHROME_BROWSER_UI_ANDROID_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698