OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.dom_distiller; | 5 package org.chromium.chrome.browser.dom_distiller; |
6 | 6 |
7 import org.chromium.chrome.browser.ChromeActivity; | 7 import org.chromium.chrome.browser.ChromeActivity; |
8 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChange Reason; | 8 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChange Reason; |
9 import org.chromium.chrome.browser.compositor.bottombar.readermode.ReaderModePan el; | |
10 import org.chromium.content_public.browser.WebContents; | 9 import org.chromium.content_public.browser.WebContents; |
11 | 10 |
12 /** | 11 /** |
13 * Delegate for the panel to call into the manager. | 12 * Delegate for the panel to call into the manager. |
14 */ | 13 */ |
15 public interface ReaderModeManagerDelegate { | 14 public interface ReaderModeManagerDelegate { |
16 /** | 15 /** |
17 * @param panel The panel to be managed. | |
18 */ | |
19 void setReaderModePanel(ReaderModePanel panel); | |
20 | |
21 /** | |
22 * Load a URL in a new tab. | 16 * Load a URL in a new tab. |
23 * @param url The URL to load in the tab. | 17 * @param url The URL to load in the tab. |
24 */ | 18 */ |
25 void createNewTab(String url); | 19 void createNewTab(String url); |
26 | 20 |
27 /** | 21 /** |
28 * Notify the manager that the panel was actually shown. | 22 * Notify the manager that the panel was actually shown. |
29 */ | 23 */ |
30 void onPanelShown(); | 24 void onPanelShown(); |
Theresa
2017/05/11 22:31:19
onInfobarShown()? Or not needed?
mdjones
2017/05/12 19:13:10
This is one of the classes that is going to disapp
| |
31 | 25 |
32 /** | 26 /** |
33 * Notify the manager that the panel has completely closed. | 27 * Notify the manager that the panel has completely closed. |
Theresa
2017/05/11 22:31:19
s/panel/infobar?
mdjones
2017/05/12 19:13:10
Cleanup CL to come.
| |
34 */ | 28 */ |
35 void onClosed(StateChangeReason reason); | 29 void onClosed(StateChangeReason reason); |
36 | 30 |
37 /** | 31 /** |
38 * Notify the manager that the panel has entered the peeking state. | |
39 */ | |
40 void onPeek(); | |
41 | |
42 /** | |
43 * Get the WebContents of the page that is being distilled. | 32 * Get the WebContents of the page that is being distilled. |
44 * @return The WebContents for the currently visible tab. | 33 * @return The WebContents for the currently visible tab. |
45 */ | 34 */ |
46 WebContents getBasePageWebContents(); | 35 WebContents getBasePageWebContents(); |
47 | 36 |
48 /** | 37 /** |
49 * Close the Reader Mode panel. This method wrap's the ReaderModePanel's clo se function and | 38 * Close the Reader Mode panel. This method wrap's the ReaderModePanel's clo se function and |
50 * checks for null. | 39 * checks for null. |
51 * @param reason The reason the panel is being closed. | 40 * @param reason The reason the panel is being closed. |
52 * @param animate If the panel should animate as it closes. | 41 * @param animate If the panel should animate as it closes. |
53 */ | 42 */ |
54 void closeReaderPanel(StateChangeReason reason, boolean animate); | 43 void closeReaderPanel(StateChangeReason reason, boolean animate); |
55 | 44 |
56 /** | 45 /** |
57 * @return The ChromeActivity that owns the manager. | 46 * @return The ChromeActivity that owns the manager. |
58 */ | 47 */ |
59 ChromeActivity getChromeActivity(); | 48 ChromeActivity getChromeActivity(); |
60 | 49 |
61 /** | 50 /** |
62 * Record the amount of time that a user spent in the Reader Mode panel. | 51 * Record the amount of time that a user spent in the Reader Mode panel. |
63 * @param timeInMs The amount of time spent in ms. | 52 * @param timeInMs The amount of time spent in ms. |
64 */ | 53 */ |
65 void recordTimeSpentInReader(long timeInMs); | 54 void recordTimeSpentInReader(long timeInMs); |
66 | |
67 /** | |
68 * Notification that the layout has changed. | |
69 */ | |
70 void onLayoutChanged(); | |
71 } | 55 } |
OLD | NEW |