Chromium Code Reviews| 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..f5f37801f605c2b6a7f145a9268fd8613c8eff34 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( |
|
Mike West
2014/10/23 19:05:35
This drops the thread assertion you used to have.
Peter Beverloo
2014/10/24 11:32:06
Yes. The LayoutTestNotificationManager can now be
|
| + 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,14 @@ LayoutTestContentBrowserClient::CheckDesktopNotificationPermission( |
| return blink::WebNotificationPermissionAllowed; |
| } |
| +void LayoutTestContentBrowserClient::ShowDesktopNotification( |
| + const ShowDesktopNotificationHostMsgParams& params, |
| + RenderFrameHost* render_frame_host, |
| + scoped_ptr<DesktopNotificationDelegate> delegate, |
| + base::Closure* cancel_callback) { |
| + LayoutTestNotificationManager* manager = GetLayoutTestNotificationManager(); |
|
Mike West
2014/10/23 19:05:35
Nit: This probably fits on one line as `if (Layout
Peter Beverloo
2014/10/24 11:32:06
No, it doesn't, but it does when using auto \o/.
|
| + if (manager) |
| + manager->Show(params, delegate.Pass(), cancel_callback); |
| +} |
| + |
| } // namespace content |