mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 958889 - Part 1: Move tabspanel files to new tabspanel package. r=bnicholson
--HG-- rename : mobile/android/base/RemoteTabsContainer.java => mobile/android/base/tabspanel/RemoteTabsContainer.java rename : mobile/android/base/RemoteTabsList.java => mobile/android/base/tabspanel/RemoteTabsList.java rename : mobile/android/base/TabsPanel.java => mobile/android/base/tabspanel/TabsPanel.java rename : mobile/android/base/TabsTray.java => mobile/android/base/tabspanel/TabsTray.java
This commit is contained in:
parent
d0cb4eed79
commit
3970ab188c
@ -48,6 +48,7 @@ import org.mozilla.gecko.preferences.GeckoPreferences;
|
||||
import org.mozilla.gecko.prompts.Prompt;
|
||||
import org.mozilla.gecko.prompts.PromptListItem;
|
||||
import org.mozilla.gecko.sync.setup.SyncAccounts;
|
||||
import org.mozilla.gecko.tabspanel.TabsPanel;
|
||||
import org.mozilla.gecko.toolbar.AutocompleteHandler;
|
||||
import org.mozilla.gecko.toolbar.BrowserToolbar;
|
||||
import org.mozilla.gecko.toolbar.ToolbarProgressView;
|
||||
|
@ -340,8 +340,6 @@ gbjar.sources += [
|
||||
'prompts/TabInput.java',
|
||||
'ReaderModeUtils.java',
|
||||
'ReferrerReceiver.java',
|
||||
'RemoteTabsContainer.java',
|
||||
'RemoteTabsList.java',
|
||||
'Restarter.java',
|
||||
'ScrollAnimator.java',
|
||||
'ServiceNotificationClient.java',
|
||||
@ -357,8 +355,10 @@ gbjar.sources += [
|
||||
'Tab.java',
|
||||
'Tabs.java',
|
||||
'TabsAccessor.java',
|
||||
'TabsPanel.java',
|
||||
'TabsTray.java',
|
||||
'tabspanel/RemoteTabsContainer.java',
|
||||
'tabspanel/RemoteTabsList.java',
|
||||
'tabspanel/TabsPanel.java',
|
||||
'tabspanel/TabsTray.java',
|
||||
'Telemetry.java',
|
||||
'TelemetryContract.java',
|
||||
'TextSelection.java',
|
||||
|
@ -10,7 +10,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/browser_toolbar_height">
|
||||
|
||||
<view class="org.mozilla.gecko.TabsPanel$TabsPanelToolbar"
|
||||
<view class="org.mozilla.gecko.tabspanel.TabsPanel$TabsPanelToolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/background_tabs">
|
||||
@ -26,42 +26,42 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<view class="org.mozilla.gecko.TabsPanel$TabsListContainer"
|
||||
<view class="org.mozilla.gecko.tabspanel.TabsPanel$TabsListContainer"
|
||||
android:id="@+id/tabs_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1.0">
|
||||
|
||||
<org.mozilla.gecko.TabsTray android:id="@+id/normal_tabs"
|
||||
style="@style/TabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:visibility="gone"
|
||||
gecko:tabs="tabs_normal"/>
|
||||
<org.mozilla.gecko.tabspanel.TabsTray android:id="@+id/normal_tabs"
|
||||
style="@style/TabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:visibility="gone"
|
||||
gecko:tabs="tabs_normal"/>
|
||||
|
||||
<org.mozilla.gecko.TabsTray android:id="@+id/private_tabs"
|
||||
style="@style/TabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:visibility="gone"
|
||||
gecko:tabs="tabs_private"/>
|
||||
<org.mozilla.gecko.tabspanel.TabsTray android:id="@+id/private_tabs"
|
||||
style="@style/TabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:visibility="gone"
|
||||
gecko:tabs="tabs_private"/>
|
||||
|
||||
<org.mozilla.gecko.RemoteTabsContainer android:id="@+id/synced_tabs"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone">
|
||||
<org.mozilla.gecko.tabspanel.RemoteTabsContainer android:id="@+id/synced_tabs"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<org.mozilla.gecko.RemoteTabsList android:id="@+id/synced_tabs_list"
|
||||
style="@style/RemoteTabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="@dimen/tabs_panel_list_padding"
|
||||
android:paddingRight="@dimen/tabs_panel_list_padding"
|
||||
android:scrollbarStyle="outsideOverlay"/>
|
||||
<org.mozilla.gecko.tabspanel.RemoteTabsList android:id="@+id/synced_tabs_list"
|
||||
style="@style/RemoteTabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="@dimen/tabs_panel_list_padding"
|
||||
android:paddingRight="@dimen/tabs_panel_list_padding"
|
||||
android:scrollbarStyle="outsideOverlay"/>
|
||||
|
||||
</org.mozilla.gecko.RemoteTabsContainer>
|
||||
</org.mozilla.gecko.tabspanel.RemoteTabsContainer>
|
||||
|
||||
</view>
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/browser_toolbar_height">
|
||||
|
||||
<view class="org.mozilla.gecko.TabsPanel$TabsPanelToolbar"
|
||||
<view class="org.mozilla.gecko.tabspanel.TabsPanel$TabsPanelToolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/background_tabs">
|
||||
|
@ -10,7 +10,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/browser_toolbar_height">
|
||||
|
||||
<view class="org.mozilla.gecko.TabsPanel$TabsPanelToolbar"
|
||||
<view class="org.mozilla.gecko.tabspanel.TabsPanel$TabsPanelToolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/background_tabs">
|
||||
@ -26,41 +26,41 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<view class="org.mozilla.gecko.TabsPanel$TabsListContainer"
|
||||
<view class="org.mozilla.gecko.tabspanel.TabsPanel$TabsListContainer"
|
||||
android:id="@+id/tabs_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<org.mozilla.gecko.TabsTray android:id="@+id/normal_tabs"
|
||||
style="@style/TabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:visibility="gone"
|
||||
gecko:tabs="tabs_normal"/>
|
||||
<org.mozilla.gecko.tabspanel.TabsTray android:id="@+id/normal_tabs"
|
||||
style="@style/TabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:visibility="gone"
|
||||
gecko:tabs="tabs_normal"/>
|
||||
|
||||
<org.mozilla.gecko.TabsTray android:id="@+id/private_tabs"
|
||||
style="@style/TabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:visibility="gone"
|
||||
gecko:tabs="tabs_private"/>
|
||||
<org.mozilla.gecko.tabspanel.TabsTray android:id="@+id/private_tabs"
|
||||
style="@style/TabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:visibility="gone"
|
||||
gecko:tabs="tabs_private"/>
|
||||
|
||||
<org.mozilla.gecko.RemoteTabsContainer android:id="@+id/synced_tabs"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone">
|
||||
<org.mozilla.gecko.tabspanel.RemoteTabsContainer android:id="@+id/synced_tabs"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<org.mozilla.gecko.RemoteTabsList android:id="@+id/synced_tabs_list"
|
||||
style="@style/RemoteTabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="@dimen/tabs_panel_list_padding"
|
||||
android:paddingRight="@dimen/tabs_panel_list_padding"
|
||||
android:scrollbarStyle="outsideOverlay"/>
|
||||
<org.mozilla.gecko.tabspanel.RemoteTabsList android:id="@+id/synced_tabs"
|
||||
style="@style/RemoteTabsList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="@dimen/tabs_panel_list_padding"
|
||||
android:paddingRight="@dimen/tabs_panel_list_padding"
|
||||
android:scrollbarStyle="outsideOverlay"/>
|
||||
|
||||
</org.mozilla.gecko.RemoteTabsContainer>
|
||||
</org.mozilla.gecko.tabspanel.RemoteTabsContainer>
|
||||
|
||||
</view>
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<org.mozilla.gecko.TabsPanel xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tabs_panel"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/background_tabs"/>
|
||||
<org.mozilla.gecko.tabspanel.TabsPanel xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tabs_panel"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/background_tabs"/>
|
||||
|
@ -2,8 +2,10 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
package org.mozilla.gecko.tabspanel;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.TabsAccessor;
|
||||
import org.mozilla.gecko.fxa.FirefoxAccounts;
|
||||
import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount;
|
||||
import org.mozilla.gecko.util.ThreadUtils;
|
@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
package org.mozilla.gecko.tabspanel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
@ -16,14 +16,18 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.Tabs;
|
||||
import org.mozilla.gecko.TabsAccessor;
|
||||
|
||||
/**
|
||||
* The actual list of synced tabs. This serves as the only child view of {@link RemoteTabsContainer}
|
||||
* so it can be refreshed using a swipe-to-refresh gesture.
|
||||
*/
|
||||
class RemoteTabsList extends ExpandableListView
|
||||
implements ExpandableListView.OnGroupClickListener,
|
||||
ExpandableListView.OnChildClickListener,
|
||||
TabsAccessor.OnQueryTabsCompleteListener {
|
||||
implements ExpandableListView.OnGroupClickListener,
|
||||
ExpandableListView.OnChildClickListener,
|
||||
TabsAccessor.OnQueryTabsCompleteListener {
|
||||
private static final String[] CLIENT_KEY = new String[] { "name" };
|
||||
private static final String[] TAB_KEY = new String[] { "title", "url" };
|
||||
private static final int[] CLIENT_RESOURCE = new int[] { R.id.client };
|
@ -3,8 +3,15 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
package org.mozilla.gecko.tabspanel;
|
||||
|
||||
import org.mozilla.gecko.GeckoApp;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoApplication;
|
||||
import org.mozilla.gecko.GeckoProfile;
|
||||
import org.mozilla.gecko.LightweightTheme;
|
||||
import org.mozilla.gecko.LightweightThemeDrawable;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.animation.PropertyAnimator;
|
||||
import org.mozilla.gecko.animation.ViewHelper;
|
||||
import org.mozilla.gecko.widget.IconTabWidget;
|
||||
@ -171,7 +178,7 @@ public class TabsPanel extends LinearLayout
|
||||
super.onDetachedFromWindow();
|
||||
mTheme.removeListener(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onLightweightThemeChanged() {
|
||||
final int background = getResources().getColor(R.color.background_tabs);
|
||||
@ -195,7 +202,7 @@ public class TabsPanel extends LinearLayout
|
||||
}
|
||||
|
||||
// Tabs List Container holds the ListView
|
||||
public static class TabsListContainer extends FrameLayout {
|
||||
static class TabsListContainer extends FrameLayout {
|
||||
public TabsListContainer(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
@ -226,8 +233,8 @@ public class TabsPanel extends LinearLayout
|
||||
}
|
||||
|
||||
// Tabs Panel Toolbar contains the Buttons
|
||||
public static class TabsPanelToolbar extends LinearLayout
|
||||
implements LightweightTheme.OnChangeListener {
|
||||
static class TabsPanelToolbar extends LinearLayout
|
||||
implements LightweightTheme.OnChangeListener {
|
||||
private final LightweightTheme mTheme;
|
||||
|
||||
public TabsPanelToolbar(Context context, AttributeSet attrs) {
|
||||
@ -251,7 +258,7 @@ public class TabsPanel extends LinearLayout
|
||||
super.onDetachedFromWindow();
|
||||
mTheme.removeListener(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onLightweightThemeChanged() {
|
||||
final int background = getResources().getColor(R.color.background_tabs);
|
@ -3,11 +3,17 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
package org.mozilla.gecko.tabspanel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.mozilla.gecko.AboutPages;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.Tab;
|
||||
import org.mozilla.gecko.Tabs;
|
||||
import org.mozilla.gecko.animation.PropertyAnimator;
|
||||
import org.mozilla.gecko.animation.PropertyAnimator.Property;
|
||||
import org.mozilla.gecko.animation.ViewHelper;
|
||||
@ -31,7 +37,7 @@ import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class TabsTray extends TwoWayView
|
||||
class TabsTray extends TwoWayView
|
||||
implements TabsPanel.PanelView {
|
||||
private static final String LOGTAG = "GeckoTabsTray";
|
||||
|
Loading…
Reference in New Issue
Block a user