Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/browser/android/favicon_helper.cc

Issue 1419103009: [Sync] Componentize ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@max_bogue_sync_backend_host
Patch Set: Rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "chrome/browser/android/favicon_helper.h" 5 #include "chrome/browser/android/favicon_helper.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/android/jni_android.h" 11 #include "base/android/jni_android.h"
12 #include "base/android/jni_array.h" 12 #include "base/android/jni_array.h"
13 #include "base/android/jni_string.h" 13 #include "base/android/jni_string.h"
14 #include "base/android/scoped_java_ref.h" 14 #include "base/android/scoped_java_ref.h"
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "chrome/browser/favicon/favicon_service_factory.h" 18 #include "chrome/browser/favicon/favicon_service_factory.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/profiles/profile_android.h" 20 #include "chrome/browser/profiles/profile_android.h"
21 #include "chrome/browser/sync/profile_sync_service.h"
22 #include "chrome/browser/sync/profile_sync_service_factory.h" 21 #include "chrome/browser/sync/profile_sync_service_factory.h"
22 #include "components/browser_sync/browser/profile_sync_service.h"
23 #include "components/favicon/core/favicon_service.h" 23 #include "components/favicon/core/favicon_service.h"
24 #include "components/favicon/core/favicon_util.h" 24 #include "components/favicon/core/favicon_util.h"
25 #include "components/favicon_base/favicon_util.h" 25 #include "components/favicon_base/favicon_util.h"
26 #include "components/sync_driver/open_tabs_ui_delegate.h" 26 #include "components/sync_driver/open_tabs_ui_delegate.h"
27 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
28 #include "jni/FaviconHelper_jni.h" 28 #include "jni/FaviconHelper_jni.h"
29 #include "third_party/skia/include/core/SkBitmap.h" 29 #include "third_party/skia/include/core/SkBitmap.h"
30 #include "ui/gfx/android/java_bitmap.h" 30 #include "ui/gfx/android/java_bitmap.h"
31 #include "ui/gfx/codec/png_codec.h" 31 #include "ui/gfx/codec/png_codec.h"
32 #include "ui/gfx/color_analysis.h" 32 #include "ui/gfx/color_analysis.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 gfx::JavaBitmap bitmap_lock(bitmap); 252 gfx::JavaBitmap bitmap_lock(bitmap);
253 SkBitmap skbitmap = gfx::CreateSkBitmapFromJavaBitmap(bitmap_lock); 253 SkBitmap skbitmap = gfx::CreateSkBitmapFromJavaBitmap(bitmap_lock);
254 return color_utils::CalculateKMeanColorOfBitmap(skbitmap); 254 return color_utils::CalculateKMeanColorOfBitmap(skbitmap);
255 } 255 }
256 256
257 // static 257 // static
258 bool FaviconHelper::RegisterFaviconHelper(JNIEnv* env) { 258 bool FaviconHelper::RegisterFaviconHelper(JNIEnv* env) {
259 return RegisterNativesImpl(env); 259 return RegisterNativesImpl(env);
260 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698