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.firstrun; | 5 package org.chromium.chrome.browser.firstrun; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.graphics.Bitmap.Config; | 10 import android.graphics.Bitmap.Config; |
11 import android.graphics.BitmapFactory; | 11 import android.graphics.BitmapFactory; |
12 import android.graphics.Canvas; | 12 import android.graphics.Canvas; |
13 import android.graphics.Color; | 13 import android.graphics.Color; |
14 import android.graphics.Paint; | 14 import android.graphics.Paint; |
15 import android.graphics.PorterDuff.Mode; | 15 import android.graphics.PorterDuff.Mode; |
16 import android.graphics.PorterDuffXfermode; | 16 import android.graphics.PorterDuffXfermode; |
17 import android.graphics.Rect; | 17 import android.graphics.Rect; |
18 | 18 |
19 import org.chromium.chrome.R; | 19 import org.chromium.chrome.R; |
20 import org.chromium.chrome.browser.profiles.Profile; | 20 import org.chromium.chrome.browser.profiles.Profile; |
21 import org.chromium.chrome.browser.profiles.ProfileDownloader; | 21 import org.chromium.chrome.browser.profiles.ProfileDownloader; |
22 import org.chromium.chrome.browser.profiles.ProfileDownloader.Observer; | 22 import org.chromium.chrome.browser.profiles.ProfileDownloader.Observer; |
23 import org.chromium.sync.signin.AccountManagerHelper; | 23 import org.chromium.components.sync.signin.AccountManagerHelper; |
24 import org.chromium.ui.gfx.DeviceDisplayInfo; | 24 import org.chromium.ui.gfx.DeviceDisplayInfo; |
25 | 25 |
26 import java.util.HashMap; | 26 import java.util.HashMap; |
27 | 27 |
28 /** | 28 /** |
29 * Fetches and caches Google Account profile images and full names for the accou
nts on the device. | 29 * Fetches and caches Google Account profile images and full names for the accou
nts on the device. |
30 */ | 30 */ |
31 public class ProfileDataCache implements Observer { | 31 public class ProfileDataCache implements Observer { |
32 | 32 |
33 private static final int PROFILE_IMAGE_SIZE_DP = 136; // Max size of the us
er picture. | 33 private static final int PROFILE_IMAGE_SIZE_DP = 136; // Max size of the us
er picture. |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 return output; | 172 return output; |
173 } | 173 } |
174 | 174 |
175 /** | 175 /** |
176 * @param observer Observer that should be notified when new profile images
are available. | 176 * @param observer Observer that should be notified when new profile images
are available. |
177 */ | 177 */ |
178 public void setObserver(Observer observer) { | 178 public void setObserver(Observer observer) { |
179 mObserver = observer; | 179 mObserver = observer; |
180 } | 180 } |
181 } | 181 } |
OLD | NEW |