Chromium Code Reviews| 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; |
| + } |
| +} |