| 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.animation.Animator; | 7 import android.animation.Animator; |
| 8 import android.animation.AnimatorListenerAdapter; | 8 import android.animation.AnimatorListenerAdapter; |
| 9 import android.animation.AnimatorSet; | 9 import android.animation.AnimatorSet; |
| 10 import android.animation.ObjectAnimator; | 10 import android.animation.ObjectAnimator; |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 * @param permission A valid ContentSettingsType that can be displayed in th
e PageInfo dialog to | 428 * @param permission A valid ContentSettingsType that can be displayed in th
e PageInfo dialog to |
| 429 * retrieve the image for. | 429 * retrieve the image for. |
| 430 * @return The resource ID of the icon to use for that permission. | 430 * @return The resource ID of the icon to use for that permission. |
| 431 */ | 431 */ |
| 432 private int getImageResourceForPermission(int permission) { | 432 private int getImageResourceForPermission(int permission) { |
| 433 switch (permission) { | 433 switch (permission) { |
| 434 case ContentSettingsType.CONTENT_SETTINGS_TYPE_IMAGES: | 434 case ContentSettingsType.CONTENT_SETTINGS_TYPE_IMAGES: |
| 435 return R.drawable.permission_images; | 435 return R.drawable.permission_images; |
| 436 case ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT: | 436 case ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT: |
| 437 return R.drawable.permission_javascript; | 437 return R.drawable.permission_javascript; |
| 438 case ContentSettingsType.CONTENT_SETTINGS_TYPE_KEYGEN: |
| 439 return R.drawable.permission_javascript; |
| 438 case ContentSettingsType.CONTENT_SETTINGS_TYPE_GEOLOCATION: | 440 case ContentSettingsType.CONTENT_SETTINGS_TYPE_GEOLOCATION: |
| 439 return R.drawable.permission_location; | 441 return R.drawable.permission_location; |
| 440 case ContentSettingsType.CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: | 442 case ContentSettingsType.CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: |
| 441 return R.drawable.permission_camera; | 443 return R.drawable.permission_camera; |
| 442 case ContentSettingsType.CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: | 444 case ContentSettingsType.CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: |
| 443 return R.drawable.permission_mic; | 445 return R.drawable.permission_mic; |
| 444 case ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS: | 446 case ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS: |
| 445 return R.drawable.permission_push_notification; | 447 return R.drawable.permission_push_notification; |
| 446 case ContentSettingsType.CONTENT_SETTINGS_TYPE_POPUPS: | 448 case ContentSettingsType.CONTENT_SETTINGS_TYPE_POPUPS: |
| 447 return R.drawable.permission_popups; | 449 return R.drawable.permission_popups; |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 new WebsiteSettingsPopup(activity, profile, webContents); | 865 new WebsiteSettingsPopup(activity, profile, webContents); |
| 864 } | 866 } |
| 865 | 867 |
| 866 private static native long nativeInit(WebsiteSettingsPopup popup, WebContent
s webContents); | 868 private static native long nativeInit(WebsiteSettingsPopup popup, WebContent
s webContents); |
| 867 | 869 |
| 868 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid); | 870 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid); |
| 869 | 871 |
| 870 private native void nativeOnPermissionSettingChanged(long nativeWebsiteSetti
ngsPopupAndroid, | 872 private native void nativeOnPermissionSettingChanged(long nativeWebsiteSetti
ngsPopupAndroid, |
| 871 int type, int setting); | 873 int type, int setting); |
| 872 } | 874 } |
| OLD | NEW |