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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManagerDelegate.java

Issue 2883643002: Clean up ReaderMode OverlayPanel classes (Closed)
Patch Set: remove extra enum Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.dom_distiller;
6
7 import org.chromium.chrome.browser.ChromeActivity;
8 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChange Reason;
9 import org.chromium.content_public.browser.WebContents;
10
11 /**
12 * Delegate for the panel to call into the manager.
13 */
14 public interface ReaderModeManagerDelegate {
15 /**
16 * Load a URL in a new tab.
17 * @param url The URL to load in the tab.
18 */
19 void createNewTab(String url);
20
21 /**
22 * Notify the manager that the panel was actually shown.
23 */
24 void onPanelShown();
25
26 /**
27 * Notify the manager that the panel has completely closed.
28 */
29 void onClosed(StateChangeReason reason);
30
31 /**
32 * Get the WebContents of the page that is being distilled.
33 * @return The WebContents for the currently visible tab.
34 */
35 WebContents getBasePageWebContents();
36
37 /**
38 * Close the Reader Mode panel. This method wrap's the ReaderModePanel's clo se function and
39 * checks for null.
40 * @param reason The reason the panel is being closed.
41 * @param animate If the panel should animate as it closes.
42 */
43 void closeReaderPanel(StateChangeReason reason, boolean animate);
44
45 /**
46 * @return The ChromeActivity that owns the manager.
47 */
48 ChromeActivity getChromeActivity();
49
50 /**
51 * Record the amount of time that a user spent in the Reader Mode panel.
52 * @param timeInMs The amount of time spent in ms.
53 */
54 void recordTimeSpentInReader(long timeInMs);
55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698