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

Side by Side Diff: chrome/browser/banners/app_banner_data_fetcher_desktop.cc

Issue 1569893003: Add "Request app banner" context menu in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated pfeldman's comment Created 4 years, 11 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 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_in_dp, 25 int ideal_icon_size_in_dp,
26 int minimum_icon_size_in_dp) 26 int minimum_icon_size_in_dp,
27 bool is_debug_mode)
27 : AppBannerDataFetcher(web_contents, 28 : AppBannerDataFetcher(web_contents,
28 weak_delegate, 29 weak_delegate,
29 ideal_icon_size_in_dp, 30 ideal_icon_size_in_dp,
30 minimum_icon_size_in_dp) { 31 minimum_icon_size_in_dp,
31 } 32 is_debug_mode) {}
32 33
33 AppBannerDataFetcherDesktop::~AppBannerDataFetcherDesktop() { 34 AppBannerDataFetcherDesktop::~AppBannerDataFetcherDesktop() {
34 } 35 }
35 36
36 bool AppBannerDataFetcherDesktop::IsWebAppInstalled( 37 bool AppBannerDataFetcherDesktop::IsWebAppInstalled(
37 content::BrowserContext* browser_context, 38 content::BrowserContext* browser_context,
38 const GURL& start_url) { 39 const GURL& start_url) {
39 return extensions::BookmarkAppHelper::BookmarkOrHostedAppInstalled( 40 return extensions::BookmarkAppHelper::BookmarkOrHostedAppInstalled(
40 browser_context, start_url); 41 browser_context, start_url);
41 } 42 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 event_request_id(), "web")); 90 event_request_id(), "web"));
90 91
91 AppBannerSettingsHelper::RecordBannerInstallEvent( 92 AppBannerSettingsHelper::RecordBannerInstallEvent(
92 web_contents, web_app_data().start_url.spec(), 93 web_contents, web_app_data().start_url.spec(),
93 AppBannerSettingsHelper::WEB); 94 AppBannerSettingsHelper::WEB);
94 } 95 }
95 } 96 }
96 } 97 }
97 98
98 } // namespace banners 99 } // namespace banners
OLDNEW
« no previous file with comments | « chrome/browser/banners/app_banner_data_fetcher_desktop.h ('k') | chrome/browser/banners/app_banner_data_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698