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

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

Issue 983043003: Componentize FaviconService and FaviconHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@favicon_service
Patch Set: Fix android_aosp (reverted the change by mistake by switching computer) Created 5 years, 9 months 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/shortcut_helper.h" 5 #include "chrome/browser/android/shortcut_helper.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "base/task/cancelable_task_tracker.h" 16 #include "base/task/cancelable_task_tracker.h"
17 #include "base/threading/worker_pool.h" 17 #include "base/threading/worker_pool.h"
18 #include "chrome/browser/banners/app_banner_settings_helper.h" 18 #include "chrome/browser/banners/app_banner_settings_helper.h"
19 #include "chrome/browser/favicon/favicon_service.h"
20 #include "chrome/browser/favicon/favicon_service_factory.h" 19 #include "chrome/browser/favicon/favicon_service_factory.h"
21 #include "chrome/browser/manifest/manifest_icon_selector.h" 20 #include "chrome/browser/manifest/manifest_icon_selector.h"
22 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/common/chrome_constants.h" 22 #include "chrome/common/chrome_constants.h"
24 #include "chrome/common/render_messages.h" 23 #include "chrome/common/render_messages.h"
25 #include "chrome/common/web_application_info.h" 24 #include "chrome/common/web_application_info.h"
26 #include "components/dom_distiller/core/url_utils.h" 25 #include "components/dom_distiller/core/url_utils.h"
26 #include "components/favicon/core/browser/favicon_service.h"
27 #include "content/public/browser/user_metrics.h" 27 #include "content/public/browser/user_metrics.h"
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "content/public/browser/web_contents_observer.h" 29 #include "content/public/browser/web_contents_observer.h"
30 #include "content/public/common/frame_navigate_params.h" 30 #include "content/public/common/frame_navigate_params.h"
31 #include "content/public/common/manifest.h" 31 #include "content/public/common/manifest.h"
32 #include "jni/ShortcutHelper_jni.h" 32 #include "jni/ShortcutHelper_jni.h"
33 #include "net/base/mime_util.h" 33 #include "net/base/mime_util.h"
34 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" 34 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
35 #include "ui/gfx/android/java_bitmap.h" 35 #include "ui/gfx/android/java_bitmap.h"
36 #include "ui/gfx/codec/png_codec.h" 36 #include "ui/gfx/codec/png_codec.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 346
347 void ShortcutHelper::RecordAddToHomescreen() { 347 void ShortcutHelper::RecordAddToHomescreen() {
348 // Record that the shortcut has been added, so no banners will be shown 348 // Record that the shortcut has been added, so no banners will be shown
349 // for this app. 349 // for this app.
350 AppBannerSettingsHelper::RecordBannerEvent( 350 AppBannerSettingsHelper::RecordBannerEvent(
351 web_contents(), shortcut_info_.url, shortcut_info_.url.spec(), 351 web_contents(), shortcut_info_.url, shortcut_info_.url.spec(),
352 AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN, 352 AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN,
353 base::Time::Now()); 353 base::Time::Now());
354 } 354 }
OLDNEW
« no previous file with comments | « chrome/browser/android/provider/chrome_browser_provider.cc ('k') | chrome/browser/android/tab_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698