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

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

Issue 2724723002: [WebAPKs]: Reduce the parameters of ShortcutHelper::AddToLauncherWithSkBitmap() (Closed)
Patch Set: Merge branch 'master' into refactor_shortcut_helper2 Created 3 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
« no previous file with comments | « chrome/browser/banners/app_banner_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_manager.h" 5 #include "chrome/browser/banners/app_banner_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h"
11 #include "base/command_line.h" 10 #include "base/command_line.h"
12 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
13 #include "base/time/time.h" 12 #include "base/time/time.h"
14 #include "chrome/browser/banners/app_banner_metrics.h" 13 #include "chrome/browser/banners/app_banner_metrics.h"
15 #include "chrome/browser/banners/app_banner_settings_helper.h" 14 #include "chrome/browser/banners/app_banner_settings_helper.h"
16 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/engagement/site_engagement_service.h" 16 #include "chrome/browser/engagement/site_engagement_service.h"
18 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
20 #include "components/rappor/public/rappor_utils.h" 19 #include "components/rappor/public/rappor_utils.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 132 }
134 133
135 void AppBannerManager::SendBannerDismissed(int request_id) { 134 void AppBannerManager::SendBannerDismissed(int request_id) {
136 if (request_id != gCurrentRequestID) 135 if (request_id != gCurrentRequestID)
137 return; 136 return;
138 137
139 DCHECK(event_.is_bound()); 138 DCHECK(event_.is_bound());
140 event_->BannerDismissed(); 139 event_->BannerDismissed();
141 } 140 }
142 141
143 base::Closure AppBannerManager::FetchWebappSplashScreenImageCallback(
144 const std::string& webapp_id) {
145 return base::Closure();
146 }
147
148 AppBannerManager::AppBannerManager(content::WebContents* web_contents) 142 AppBannerManager::AppBannerManager(content::WebContents* web_contents)
149 : content::WebContentsObserver(web_contents), 143 : content::WebContentsObserver(web_contents),
150 SiteEngagementObserver(nullptr), 144 SiteEngagementObserver(nullptr),
151 manager_(nullptr), 145 manager_(nullptr),
152 event_request_id_(-1), 146 event_request_id_(-1),
153 binding_(this), 147 binding_(this),
154 is_active_(false), 148 is_active_(false),
155 banner_request_queued_(false), 149 banner_request_queued_(false),
156 load_finished_(false), 150 load_finished_(false),
157 was_canceled_by_page_(false), 151 was_canceled_by_page_(false),
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // Simulate a non-canceled OnBannerPromptReply to show the delayed banner. 527 // Simulate a non-canceled OnBannerPromptReply to show the delayed banner.
534 // Don't reset |was_canceled_by_page_| yet for metrics purposes. 528 // Don't reset |was_canceled_by_page_| yet for metrics purposes.
535 OnBannerPromptReply(blink::mojom::AppBannerPromptReply::NONE, referrer_); 529 OnBannerPromptReply(blink::mojom::AppBannerPromptReply::NONE, referrer_);
536 } else { 530 } else {
537 // Log that the prompt request was made for when we get the prompt reply. 531 // Log that the prompt request was made for when we get the prompt reply.
538 page_requested_prompt_ = true; 532 page_requested_prompt_ = true;
539 } 533 }
540 } 534 }
541 535
542 } // namespace banners 536 } // namespace banners
OLDNEW
« no previous file with comments | « chrome/browser/banners/app_banner_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698