| 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 #include "chrome/browser/banners/app_banner_data_fetcher_desktop.h" | 5 #include "chrome/browser/banners/app_banner_data_fetcher_desktop.h" |
| 6 | 6 |
| 7 #include "chrome/browser/banners/app_banner_infobar_delegate_desktop.h" | 7 #include "chrome/browser/banners/app_banner_infobar_delegate_desktop.h" |
| 8 #include "chrome/browser/banners/app_banner_metrics.h" | 8 #include "chrome/browser/banners/app_banner_metrics.h" |
| 9 #include "chrome/browser/banners/app_banner_settings_helper.h" | 9 #include "chrome/browser/banners/app_banner_settings_helper.h" |
| 10 #include "chrome/browser/extensions/bookmark_app_helper.h" | 10 #include "chrome/browser/extensions/bookmark_app_helper.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/common/render_messages.h" | 12 #include "chrome/common/render_messages.h" |
| 13 #include "chrome/common/web_application_info.h" | 13 #include "chrome/common/web_application_info.h" |
| 14 #include "content/public/browser/render_frame_host.h" | 14 #include "content/public/browser/render_frame_host.h" |
| 15 | 15 |
| 16 namespace infobars { | 16 namespace infobars { |
| 17 class InfoBar; | 17 class InfoBar; |
| 18 } // namespace infobars | 18 } // namespace infobars |
| 19 | 19 |
| 20 namespace banners { | 20 namespace banners { |
| 21 | 21 |
| 22 AppBannerDataFetcherDesktop::AppBannerDataFetcherDesktop( | 22 AppBannerDataFetcherDesktop::AppBannerDataFetcherDesktop( |
| 23 content::WebContents* web_contents, | 23 content::WebContents* web_contents, |
| 24 base::WeakPtr<Delegate> weak_delegate, | 24 base::WeakPtr<Delegate> weak_delegate, |
| 25 int ideal_icon_size) | 25 int ideal_icon_size_in_dp, |
| 26 : AppBannerDataFetcher(web_contents, weak_delegate, ideal_icon_size) { | 26 int minimum_icon_size_in_dp) |
| 27 : AppBannerDataFetcher(web_contents, |
| 28 weak_delegate, |
| 29 ideal_icon_size_in_dp, |
| 30 minimum_icon_size_in_dp) { |
| 27 } | 31 } |
| 28 | 32 |
| 29 AppBannerDataFetcherDesktop::~AppBannerDataFetcherDesktop() { | 33 AppBannerDataFetcherDesktop::~AppBannerDataFetcherDesktop() { |
| 30 } | 34 } |
| 31 | 35 |
| 32 bool AppBannerDataFetcherDesktop::IsWebAppInstalled( | 36 bool AppBannerDataFetcherDesktop::IsWebAppInstalled( |
| 33 content::BrowserContext* browser_context, | 37 content::BrowserContext* browser_context, |
| 34 const GURL& start_url) { | 38 const GURL& start_url) { |
| 35 return extensions::BookmarkAppHelper::BookmarkOrHostedAppInstalled( | 39 return extensions::BookmarkAppHelper::BookmarkOrHostedAppInstalled( |
| 36 browser_context, start_url); | 40 browser_context, start_url); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 event_request_id(), "web")); | 89 event_request_id(), "web")); |
| 86 | 90 |
| 87 AppBannerSettingsHelper::RecordBannerInstallEvent( | 91 AppBannerSettingsHelper::RecordBannerInstallEvent( |
| 88 web_contents, web_app_data().start_url.spec(), | 92 web_contents, web_app_data().start_url.spec(), |
| 89 AppBannerSettingsHelper::WEB); | 93 AppBannerSettingsHelper::WEB); |
| 90 } | 94 } |
| 91 } | 95 } |
| 92 } | 96 } |
| 93 | 97 |
| 94 } // namespace banners | 98 } // namespace banners |
| OLD | NEW |