Chromium Code Reviews| 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.compositor.bottombar.contextualsearch.Context ualSearchPanel.StateChangeReason; | 7 import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.Context ualSearchPanel.StateChangeReason; |
| 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.chrome.browser.customtabs.CustomTab; | 9 import org.chromium.chrome.browser.customtabs.CustomTab; |
| 10 import org.chromium.chrome.browser.tab.Tab; | 10 import org.chromium.chrome.browser.tab.Tab; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 * should jump immediately. | 47 * should jump immediately. |
| 48 */ | 48 */ |
| 49 void updateTopControlsState(int current, boolean animate); | 49 void updateTopControlsState(int current, boolean animate); |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * Promotes the current Content View Core in the Contextual Search Panel to its own Tab. | 52 * Promotes the current Content View Core in the Contextual Search Panel to its own Tab. |
| 53 */ | 53 */ |
| 54 void promoteToTab(); | 54 void promoteToTab(); |
| 55 | 55 |
| 56 /** | 56 /** |
| 57 * Resets the Search Content View scroll position. | |
| 58 */ | |
| 59 void resetSearchContentViewScroll(); | |
| 60 | |
| 61 /** | |
| 62 * Gets the Search Content View's vertical scroll position. If the Search Co ntent View | 57 * Gets the Search Content View's vertical scroll position. If the Search Co ntent View |
| 63 * is not available it returns -1. | 58 * is not available it returns -1. |
| 64 * @return The Search Content View scroll position. | 59 * @return The Search Content View scroll position. |
| 65 */ | 60 */ |
| 66 float getSearchContentViewVerticalScroll(); | 61 float getSearchContentViewVerticalScroll(); |
| 67 | 62 |
| 68 /** | 63 /** |
| 69 * Sets the visibility of the Search Content View. | 64 * Sets the visibility of the Search Content View. |
| 70 * TODO(pedrosimonetti): Revisit this API. Consumers should not be allowed t o make | 65 * TODO(pedrosimonetti): Revisit this API. Consumers should not be allowed t o make |
| 71 * it invisible, only visible. | 66 * it invisible, only visible. |
| 72 * @param isVisible True to make it visible. | 67 * @param isVisible True to make it visible. |
| 73 */ | 68 */ |
| 74 void setSearchContentViewVisibility(boolean isVisible); | 69 //void setSearchContentViewVisibility(boolean isVisible); |
| 75 | 70 |
| 76 /** | 71 /** |
| 77 * Sets the delegate responsible for manipulating the ContextualSearchLayout . | 72 * Sets the delegate responsible for manipulating the ContextualSearchLayout . |
| 78 * @param delegate The ContextualSearchLayoutDelegate. | 73 * @param delegate The ContextualSearchLayoutDelegate. |
| 79 */ | 74 */ |
| 80 void setContextualSearchPanelDelegate(ContextualSearchPanelDelegate delegate ); | 75 void setContextualSearchPanelDelegate(ContextualSearchPanelDelegate delegate ); |
| 81 | 76 |
| 82 /** | 77 /** |
| 83 * Gets whether the device is running in compatibility mode for Contextual S earch. | 78 * Gets whether the device is running in compatibility mode for Contextual S earch. |
| 84 * If so, a new tab showing search results should be opened instead of showi ng the panel. | 79 * If so, a new tab showing search results should be opened instead of showi ng the panel. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 | 111 |
| 117 /** | 112 /** |
| 118 * @return The resource id that contains how large the top controls are. | 113 * @return The resource id that contains how large the top controls are. |
| 119 */ | 114 */ |
| 120 int getControlContainerHeightResource(); | 115 int getControlContainerHeightResource(); |
| 121 | 116 |
| 122 /** | 117 /** |
| 123 * @return Whether the current activity contains a {@link CustomTab}. | 118 * @return Whether the current activity contains a {@link CustomTab}. |
| 124 */ | 119 */ |
| 125 boolean isCustomTab(); | 120 boolean isCustomTab(); |
| 121 | |
| 122 /** | |
| 123 * @return The ContentViewCore of the base page that contextual search is sh owing on. | |
| 124 */ | |
| 125 ContentViewCore getBaseContentView(); | |
| 126 | |
| 127 /** | |
| 128 * This method is called when the panel's ContentViewCore is created. | |
| 129 * @param contentView The created ContentViewCore. | |
| 130 */ | |
| 131 void onContentViewCreated(ContentViewCore contentView); | |
| 132 | |
| 133 /** | |
| 134 * This method is called when the panel's ContentViewCore is destroyed. | |
| 135 */ | |
| 136 void onContentViewDestroyed(); | |
| 137 | |
| 138 /** | |
| 139 * This is called on navigation of the contextual search pane This is called on navigation | |
| 140 * of the contextual search panel. | |
| 141 */ | |
| 142 void onContextualSearchRequestNavigation(boolean isFailure); | |
|
David Trainor- moved to gerrit
2015/08/28 22:02:18
@param
mdjones
2015/08/28 23:51:58
Done.
| |
| 143 | |
| 144 /** | |
| 145 * This is called when the search panel is shown or is hidden. | |
| 146 * @param isVisible True if the panel is now visible. | |
| 147 */ | |
| 148 void onContentViewVisibilityChanged(boolean isVisible); | |
|
David Trainor- moved to gerrit
2015/08/28 22:02:18
@param
mdjones
2015/08/28 23:51:58
Already there
| |
| 149 | |
| 150 /** | |
| 151 * This is called when the panel has loaded search results. | |
| 152 */ | |
| 153 void onSearchResultsLoaded(); | |
| 126 } | 154 } |
| OLD | NEW |