Chromium Code Reviews| 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 { |