OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.app.Dialog; | 7 import android.app.Dialog; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.DialogInterface; | 9 import android.content.DialogInterface; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 * Shows a WebsiteSettings dialog for the provided WebContents. The popup | 184 * Shows a WebsiteSettings dialog for the provided WebContents. The popup |
185 * adds itself to the view hierarchy which owns the reference while it's | 185 * adds itself to the view hierarchy which owns the reference while it's |
186 * visible. | 186 * visible. |
187 * | 187 * |
188 * @param context Context which is used for launching a dialog. | 188 * @param context Context which is used for launching a dialog. |
189 * @param webContents The WebContents for which to show Website information. | 189 * @param webContents The WebContents for which to show Website information. |
190 * This information is retrieved for the visible entry. | 190 * This information is retrieved for the visible entry. |
191 */ | 191 */ |
192 @SuppressWarnings("unused") | 192 @SuppressWarnings("unused") |
193 public static void show(Context context, WebContents webContents) { | 193 public static void show(Context context, WebContents webContents) { |
194 if (CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_NEW_WEBSIT
E_SETTINGS)) { | 194 if (!CommandLine.getInstance().hasSwitch(ChromeSwitches.DISABLE_NEW_WEBS
ITE_SETTINGS)) { |
195 new WebsiteSettingsPopup(context, webContents); | 195 new WebsiteSettingsPopup(context, webContents); |
196 } else { | 196 } else { |
197 WebsiteSettingsPopupLegacy.show(context, webContents); | 197 WebsiteSettingsPopupLegacy.show(context, webContents); |
198 } | 198 } |
199 } | 199 } |
200 | 200 |
201 private static native long nativeInit(WebsiteSettingsPopup popup, | 201 private static native long nativeInit(WebsiteSettingsPopup popup, |
202 WebContents webContents); | 202 WebContents webContents); |
203 | 203 |
204 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid); | 204 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid); |
205 } | 205 } |
OLD | NEW |