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

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 addressed 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 017d081cabb6c8b4f4312aa95d1b5ab9e5aa19d2..40354c26444ca7b998fac5c2e1bb71c497fcbe9f 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,24 +1448,11 @@ std::unique_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser(
}
void Browser::RequestAppBannerFromDevTools(content::WebContents* web_contents) {
- banners::AppBannerManagerDesktop::CreateForWebContents(web_contents);
- RequestAppBanner(web_contents);
-}
-
-bool Browser::RequestAppBanner(content::WebContents* web_contents) {
- banners::AppBannerManagerDesktop* manager =
- banners::AppBannerManagerDesktop::FromWebContents(web_contents);
- if (manager) {
- manager->RequestAppBanner(web_contents->GetMainFrame(),
- web_contents->GetLastCommittedURL(), true);
- return true;
- }
-
- web_contents->GetMainFrame()->AddMessageToConsole(
- content::CONSOLE_MESSAGE_LEVEL_DEBUG,
- "App banners are currently disabled. Please check chrome://flags/#" +
- std::string(switches::kEnableAddToShelf));
- return false;
+ banners::AppBannerManagerEmulation::CreateForWebContents(web_contents);
sky 2016/05/06 21:48:12 Why does this code need to be in Browser? AFAICT i
+ banners::AppBannerManagerEmulation* manager =
+ banners::AppBannerManagerEmulation::FromWebContents(web_contents);
+ manager->RequestAppBanner(web_contents->GetMainFrame(),
+ web_contents->GetLastCommittedURL(), true);
}
bool Browser::IsMouseLocked() const {
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698