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

Unified Diff: chrome/android/java_staging/src/org/chromium/chrome/browser/gsa/GSAContextReportDelegate.java

Issue 1141283003: Upstream oodles of Chrome for Android code into Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final patch? Created 5 years, 7 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_staging/src/org/chromium/chrome/browser/gsa/GSAContextReportDelegate.java
diff --git a/chrome/android/java_staging/src/org/chromium/chrome/browser/gsa/GSAContextReportDelegate.java b/chrome/android/java_staging/src/org/chromium/chrome/browser/gsa/GSAContextReportDelegate.java
new file mode 100644
index 0000000000000000000000000000000000000000..82eeed6ecba23d6ff2a3facebedfc3b8c51f8eba
--- /dev/null
+++ b/chrome/android/java_staging/src/org/chromium/chrome/browser/gsa/GSAContextReportDelegate.java
@@ -0,0 +1,28 @@
+// Copyright 2015 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.gsa;
+
+import android.support.annotation.Nullable;
+
+/**
+ * The interface that allows the current browsing context to be reported to GSA.
+ */
+public interface GSAContextReportDelegate {
+
+ /**
+ * Report the current url and title (i.e. the context) to GSA. This method marks the start of a
+ * context, and it should be used in pair with {@link #reportContextUsageEnded()}.
+ * @param url The url for the current context.
+ * @param title The page title for the current context.
+ * @param displaySelection The {@code SsbContextDisplaySelection} or {@code null}.
+ */
+ void reportContext(String url, String title,
+ @Nullable GSAContextDisplaySelection displaySelection);
+
+ /**
+ * Report the end of usage for the previously reported context.
+ */
+ void reportContextUsageEnded();
+}

Powered by Google App Engine
This is Rietveld 408576698