OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.webapps; | 5 package org.chromium.chrome.browser.webapps; |
6 | 6 |
7 import android.content.Intent; | 7 import android.content.Intent; |
8 | 8 |
9 import org.chromium.chrome.browser.ShortcutHelper; | 9 import org.chromium.chrome.browser.ShortcutHelper; |
10 import org.chromium.chrome.browser.banners.AppBannerManager; | |
11 import org.chromium.chrome.browser.tab.Tab; | |
12 import org.chromium.chrome.browser.tab.TabDelegateFactory; | |
10 import org.chromium.content_public.browser.LoadUrlParams; | 13 import org.chromium.content_public.browser.LoadUrlParams; |
11 import org.chromium.ui.base.PageTransition; | 14 import org.chromium.ui.base.PageTransition; |
12 | 15 |
13 /** | 16 /** |
14 * An Activity is designed for WebAPKs (native Android apps) and displays a weba pp in a nearly | 17 * An Activity is designed for WebAPKs (native Android apps) and displays a weba pp in a nearly |
15 * UI-less Chrome. | 18 * UI-less Chrome. |
16 */ | 19 */ |
17 public class WebApkActivity extends WebappActivity { | 20 public class WebApkActivity extends WebappActivity { |
18 @Override | 21 @Override |
19 protected void onNewIntent(Intent intent) { | 22 protected void onNewIntent(Intent intent) { |
(...skipping 12 matching lines...) Expand all Loading... | |
32 new LoadUrlParams(overrideUrl, PageTransition.AUTO_TOPLEVEL) ); | 35 new LoadUrlParams(overrideUrl, PageTransition.AUTO_TOPLEVEL) ); |
33 } | 36 } |
34 } | 37 } |
35 | 38 |
36 @Override | 39 @Override |
37 protected void initializeSplashScreenWidgets(final int backgroundColor) { | 40 protected void initializeSplashScreenWidgets(final int backgroundColor) { |
38 // TODO(hanxi): Removes this function and use {@link WebApkActivity}'s i mplementation | 41 // TODO(hanxi): Removes this function and use {@link WebApkActivity}'s i mplementation |
39 // when WebAPKs are registered in WebappRegistry. | 42 // when WebAPKs are registered in WebappRegistry. |
40 initializeSplashScreenWidgets(backgroundColor, null); | 43 initializeSplashScreenWidgets(backgroundColor, null); |
41 } | 44 } |
45 | |
46 @Override | |
47 protected TabDelegateFactory createTabDelegateFactory() { | |
48 return new WebappDelegateFactory(this) { | |
49 @Override | |
50 public AppBannerManager createAppBannerManager(Tab tab) { | |
gone
2016/05/31 18:26:55
Do you not want to show _any_ app banners in WebAp
pkotwicz
2016/05/31 20:14:27
I am aware of only two types of app banners:
- App
gone
2016/05/31 20:28:38
You're assuming the only app banners shown are for
pkotwicz
2016/05/31 21:59:30
That's a sticky point. Ideally when a user navigat
gone
2016/05/31 22:02:34
Yeah, I'm fine with that, too. That needs to be d
| |
51 return null; | |
52 } | |
53 }; | |
54 } | |
42 } | 55 } |
OLD | NEW |