| Index: content/shell/browser/layout_test/layout_test_content_browser_client.cc
|
| diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
|
| index 5194da29cd364dc29a82b1b2dcd9efbc1767f04d..54d42af72cf9dbc45be300c6bc95a990e5f14e80 100644
|
| --- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
|
| +++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
|
| @@ -35,6 +35,10 @@ void RequestDesktopNotificationPermissionOnIO(
|
|
|
| LayoutTestContentBrowserClient::LayoutTestContentBrowserClient() {
|
| DCHECK(!g_layout_test_browser_client);
|
| +
|
| + layout_test_notification_manager_.reset(
|
| + new LayoutTestNotificationManager());
|
| +
|
| g_layout_test_browser_client = this;
|
| }
|
|
|
| @@ -48,12 +52,6 @@ LayoutTestContentBrowserClient* LayoutTestContentBrowserClient::Get() {
|
|
|
| LayoutTestNotificationManager*
|
| LayoutTestContentBrowserClient::GetLayoutTestNotificationManager() {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| - if (!layout_test_notification_manager_) {
|
| - layout_test_notification_manager_.reset(
|
| - new LayoutTestNotificationManager());
|
| - }
|
| -
|
| return layout_test_notification_manager_.get();
|
| }
|
|
|
| @@ -97,4 +95,13 @@ LayoutTestContentBrowserClient::CheckDesktopNotificationPermission(
|
| return blink::WebNotificationPermissionAllowed;
|
| }
|
|
|
| +void LayoutTestContentBrowserClient::ShowDesktopNotification(
|
| + const ShowDesktopNotificationHostMsgParams& params,
|
| + RenderFrameHost* render_frame_host,
|
| + scoped_ptr<DesktopNotificationDelegate> delegate,
|
| + base::Closure* cancel_callback) {
|
| + if (auto* manager = GetLayoutTestNotificationManager())
|
| + manager->Show(params, delegate.Pass(), cancel_callback);
|
| +}
|
| +
|
| } // namespace content
|
|
|