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.webapps; | 5 package org.chromium.chrome.browser.webapps; |
6 | 6 |
7 import android.support.test.filters.MediumTest; | 7 import android.support.test.filters.MediumTest; |
8 | 8 |
9 import org.chromium.base.test.util.Feature; | 9 import org.chromium.base.test.util.Feature; |
10 import org.chromium.chrome.browser.tab.Tab; | 10 import org.chromium.chrome.browser.tab.Tab; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 private static boolean shouldShowBrowserControls( | 95 private static boolean shouldShowBrowserControls( |
96 String webappStartUrlOrScopeUrl, String url, int securityLevel, Type
type) { | 96 String webappStartUrlOrScopeUrl, String url, int securityLevel, Type
type) { |
97 WebappBrowserControlsDelegate delegate; | 97 WebappBrowserControlsDelegate delegate; |
98 WebappInfo info; | 98 WebappInfo info; |
99 if (type == Type.WEBAPP) { | 99 if (type == Type.WEBAPP) { |
100 delegate = new WebappBrowserControlsDelegate(null, new Tab(0, false,
null)); | 100 delegate = new WebappBrowserControlsDelegate(null, new Tab(0, false,
null)); |
101 info = WebappInfo.create( | 101 info = WebappInfo.create( |
102 "", webappStartUrlOrScopeUrl, null, null, null, null, 0, 0,
0, 0, 0, false); | 102 "", webappStartUrlOrScopeUrl, null, null, null, null, 0, 0,
0, 0, 0, false); |
103 } else { | 103 } else { |
104 delegate = new WebApkBrowserControlsDelegate(null, new Tab(0, false,
null)); | 104 delegate = new WebApkBrowserControlsDelegate(null, new Tab(0, false,
null)); |
105 info = WebApkInfo.create("", "", webappStartUrlOrScopeUrl, null, nul
l, null, 0, 0, 0, 0, | 105 info = WebApkInfo.create("", "", false /* forceNavigation */, webapp
StartUrlOrScopeUrl, |
106 0, "", 0, null, "", null); | 106 null, null, null, 0, 0, 0, 0, 0, "", 0, null, "", null); |
107 } | 107 } |
108 return delegate.shouldShowBrowserControls(info, url, securityLevel); | 108 return delegate.shouldShowBrowserControls(info, url, securityLevel); |
109 } | 109 } |
110 } | 110 } |
OLD | NEW |