OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.contextualsearch; | 5 package org.chromium.chrome.browser.contextualsearch; |
6 | 6 |
7 import org.chromium.chrome.browser.Tab; | 7 import org.chromium.chrome.browser.Tab; |
8 import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.Context
ualSearchPanelDelegate; | 8 import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.Context
ualSearchPanelDelegate; |
9 import org.chromium.content.browser.ContentViewCore; | 9 import org.chromium.content.browser.ContentViewCore; |
10 import org.chromium.content_public.common.TopControlsState; | 10 import org.chromium.content_public.common.TopControlsState; |
11 | 11 |
12 /** | 12 /** |
13 * The delegate that provides global management functionality for Contextual Sea
rch. | 13 * The delegate that provides global management functionality for Contextual Sea
rch. |
14 */ | 14 */ |
15 public interface ContextualSearchManagementDelegate { | 15 public interface ContextualSearchManagementDelegate { |
16 /** | 16 /** |
| 17 * Sets the preference state to enabled or disabled. |
| 18 * |
| 19 * @param enabled Whether the preference should be set to enabled. |
| 20 */ |
| 21 public void setPreferenceState(boolean enabled); |
| 22 |
| 23 /** |
| 24 * @return Whether the Opt-out promo is available to be be shown in the pane
l. |
| 25 */ |
| 26 boolean isOptOutPromoAvailable(); |
| 27 |
| 28 /** |
17 * @return Whether or not the Contextual Search Bar is peeking. | 29 * @return Whether or not the Contextual Search Bar is peeking. |
18 */ | 30 */ |
19 boolean isSearchBarPeeking(); | 31 boolean isSearchBarPeeking(); |
20 | 32 |
21 /** | 33 /** |
22 * Updates the top controls state for the base tab. As these values are set
at the renderer | 34 * Updates the top controls state for the base tab. As these values are set
at the renderer |
23 * level, there is potential for this impacting other tabs that might share
the same | 35 * level, there is potential for this impacting other tabs that might share
the same |
24 * process. See {@link Tab#updateTopControlsState(int current, boolean anima
te)} | 36 * process. See {@link Tab#updateTopControlsState(int current, boolean anima
te)} |
25 * @param current The desired current state for the controls. Pass | 37 * @param current The desired current state for the controls. Pass |
26 * {@link TopControlsState#BOTH} to preserve the current posi
tion. | 38 * {@link TopControlsState#BOTH} to preserve the current posi
tion. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 * showing as well as any bar that's peeking. | 95 * showing as well as any bar that's peeking. |
84 */ | 96 */ |
85 void dismissContextualSearchBar(); | 97 void dismissContextualSearchBar(); |
86 | 98 |
87 /** | 99 /** |
88 * Gets the {@code ContentViewCore} associated with Contextual Search Panel. | 100 * Gets the {@code ContentViewCore} associated with Contextual Search Panel. |
89 * @return Contextual Search Panel's {@code ContentViewCore}. | 101 * @return Contextual Search Panel's {@code ContentViewCore}. |
90 */ | 102 */ |
91 ContentViewCore getSearchContentViewCore(); | 103 ContentViewCore getSearchContentViewCore(); |
92 } | 104 } |
OLD | NEW |