| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 40354c26444ca7b998fac5c2e1bb71c497fcbe9f..017d081cabb6c8b4f4312aa95d1b5ab9e5aa19d2 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -36,7 +36,6 @@
|
| #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"
|
| @@ -1448,11 +1447,24 @@
|
| }
|
|
|
| void Browser::RequestAppBannerFromDevTools(content::WebContents* web_contents) {
|
| - banners::AppBannerManagerEmulation::CreateForWebContents(web_contents);
|
| - banners::AppBannerManagerEmulation* manager =
|
| - banners::AppBannerManagerEmulation::FromWebContents(web_contents);
|
| - manager->RequestAppBanner(web_contents->GetMainFrame(),
|
| - web_contents->GetLastCommittedURL(), true);
|
| + 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;
|
| }
|
|
|
| bool Browser::IsMouseLocked() const {
|
|
|