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

Unified Diff: chrome/browser/ui/browser.cc

Issue 1950133009: DevTools: account for the display scale factor while validating manifest under emulation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment added Created 4 years, 7 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/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 9512433473b7a625f4b34d7545c992ed58b4836f..42714b8781cd04a533f5e028e3b1ca28830dae21 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -36,6 +36,7 @@
#include "chrome/browser/background/background_contents_service.h"
#include "chrome/browser/background/background_contents_service_factory.h"
#include "chrome/browser/banners/app_banner_manager_desktop.h"
+#include "chrome/browser/banners/app_banner_manager_emulation.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/character_encoding.h"
@@ -1447,8 +1448,11 @@ std::unique_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser(
}
void Browser::RequestAppBannerFromDevTools(content::WebContents* web_contents) {
- banners::AppBannerManagerDesktop::CreateForWebContents(web_contents);
- RequestAppBanner(web_contents);
+ banners::AppBannerManagerEmulation::CreateForWebContents(web_contents);
+ banners::AppBannerManagerEmulation* manager =
+ banners::AppBannerManagerEmulation::FromWebContents(web_contents);
+ manager->RequestAppBanner(web_contents->GetMainFrame(),
+ web_contents->GetLastCommittedURL(), true);
}
bool Browser::RequestAppBanner(content::WebContents* web_contents) {
dominickn 2016/05/06 18:29:47 Nit: it looks like this method isn't called from a
dominickn 2016/05/06 18:42:38 Ping?
pfeldman 2016/05/06 19:32:05 I did not realize that. Done.

Powered by Google App Engine
This is Rietveld 408576698