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

Unified Diff: chrome/browser/banners/app_banner_infobar_delegate_desktop.cc

Issue 2393513004: Convert app banners to use Mojo. (Closed)
Patch Set: Add TODO Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
diff --git a/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc b/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
index e0ee381bb7fb5312c578b3cd22c532d755770f4a..34da670ec8721f5912502547d3296a845800d44a 100644
--- a/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
+++ b/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
@@ -4,18 +4,17 @@
#include "chrome/browser/banners/app_banner_infobar_delegate_desktop.h"
+#include <memory>
+
#include "base/bind.h"
-#include "build/build_config.h"
#include "chrome/browser/banners/app_banner_manager.h"
#include "chrome/browser/banners/app_banner_metrics.h"
#include "chrome/browser/banners/app_banner_settings_helper.h"
#include "chrome/browser/extensions/bookmark_app_helper.h"
#include "chrome/browser/infobars/infobar_service.h"
-#include "chrome/common/render_messages.h"
#include "chrome/common/web_application_info.h"
#include "chrome/grit/generated_resources.h"
#include "components/infobars/core/infobar.h"
-#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/vector_icons_public.h"
@@ -76,10 +75,8 @@ void AppBannerInfoBarDelegateDesktop::InfoBarDismissed() {
content::WebContents* web_contents =
InfoBarService::WebContentsFromInfoBar(infobar());
if (web_contents) {
- web_contents->GetMainFrame()->Send(
- new ChromeViewMsg_AppBannerDismissed(
- web_contents->GetMainFrame()->GetRoutingID(),
- event_request_id_));
+ if (weak_manager_)
+ weak_manager_->SendBannerDismissed(event_request_id_);
AppBannerSettingsHelper::RecordBannerDismissEvent(
web_contents, manifest_.start_url.spec(), AppBannerSettingsHelper::WEB);
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager_android.cc ('k') | chrome/browser/banners/app_banner_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698