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

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

Issue 10905058: Upstream the Android port find-in-page feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/android/java/src/org/chromium/chrome/browser/FindNotificationDetails.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/FindNotificationDetails.java b/chrome/android/java/src/org/chromium/chrome/browser/FindNotificationDetails.java
new file mode 100644
index 0000000000000000000000000000000000000000..ed8058e89dd11b943c453943a1a307f7f4c357f1
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/FindNotificationDetails.java
@@ -0,0 +1,40 @@
+// 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.
+
+package org.chromium.chrome.browser;
+
+import android.graphics.Rect;
+
+/**
+ * Java equivalent to the C++ FindNotificationDetails class
+ * defined in chrome/browser/ui/find_bar/find_notification_details.h
+ */
+public class FindNotificationDetails {
jam 2012/09/04 16:39:09 question: do you need all these members for your a
Leandro GraciĆ” Gil 2012/09/04 18:25:50 We need to use the notification from FindTabHelper
+ /** How many matches were found. */
+ public final int numberOfMatches;
+
+ /** Where selection occurred (in renderer window coordinates). */
+ public final Rect rendererSelectionRect;
+
+ /**
+ * The ordinal of the currently selected match.
+ *
+ * Might be -1 even with matches in rare edge cases where the active match
+ * has been removed from DOM by the time the active ordinals are processed.
+ * This indicates we failed to locate and highlight the active match.
+ */
+ public final int activeMatchOrdinal;
+
+ /** Whether this is the last Find Result update for the request. */
+ public final boolean finalUpdate;
+
+ public FindNotificationDetails(
+ int numberOfMatches, Rect rendererSelectionRect,
+ int activeMatchOrdinal, boolean finalUpdate) {
+ this.numberOfMatches = numberOfMatches;
+ this.rendererSelectionRect = rendererSelectionRect;
+ this.activeMatchOrdinal = activeMatchOrdinal;
+ this.finalUpdate = finalUpdate;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698