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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulatorWrapper.java

Issue 73173002: Add ContextMenu support upstream for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added tests, addressed comments Created 7 years, 1 month 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/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulatorWrapper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulatorWrapper.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulatorWrapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..07ac4dffbf68128c7e4e149d1cb6c23fb011fbd0
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulatorWrapper.java
@@ -0,0 +1,34 @@
+// Copyright 2013 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.
+
+package org.chromium.chrome.browser.contextmenu;
+
+import android.content.Context;
+import android.view.ContextMenu;
+
+/**
+ *
Ted C 2013/11/26 01:50:09 missing javadoc
David Trainor- moved to gerrit 2013/11/26 23:51:07 Done.
+ */
+public class ContextMenuPopulatorWrapper implements ContextMenuPopulator {
+ private final ContextMenuPopulator mPopulator;
+
+ public ContextMenuPopulatorWrapper(ContextMenuPopulator populator) {
+ mPopulator = populator;
+ }
+
+ @Override
+ public boolean shouldShowContextMenu(ContextMenuParams params) {
+ return mPopulator.shouldShowContextMenu(params);
+ }
+
+ @Override
+ public void buildContextMenu(ContextMenu menu, Context context, ContextMenuParams params) {
+ mPopulator.buildContextMenu(menu, context, params);
+ }
+
+ @Override
+ public boolean onItemSelected(ContextMenuHelper helper, ContextMenuParams params, int itemId) {
+ return mPopulator.onItemSelected(helper, params, itemId);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698