| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h
" | 5 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h
" |
| 6 | 6 |
| 7 #include "content/public/browser/browser_context.h" | 7 #include "content/public/browser/browser_context.h" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/render_process_host.h" | 9 #include "content/public/browser/render_process_host.h" |
| 10 #include "content/public/browser/storage_partition.h" | 10 #include "content/public/browser/storage_partition.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 int render_process_id) { | 90 int render_process_id) { |
| 91 LayoutTestNotificationManager* manager = GetLayoutTestNotificationManager(); | 91 LayoutTestNotificationManager* manager = GetLayoutTestNotificationManager(); |
| 92 if (manager) | 92 if (manager) |
| 93 return manager->CheckPermission(source_url); | 93 return manager->CheckPermission(source_url); |
| 94 | 94 |
| 95 return blink::WebNotificationPermissionAllowed; | 95 return blink::WebNotificationPermissionAllowed; |
| 96 } | 96 } |
| 97 | 97 |
| 98 void LayoutTestContentBrowserClient::ShowDesktopNotification( | 98 void LayoutTestContentBrowserClient::ShowDesktopNotification( |
| 99 const ShowDesktopNotificationHostMsgParams& params, | 99 const ShowDesktopNotificationHostMsgParams& params, |
| 100 RenderFrameHost* render_frame_host, | 100 BrowserContext* browser_context, |
| 101 int render_process_id, |
| 101 scoped_ptr<DesktopNotificationDelegate> delegate, | 102 scoped_ptr<DesktopNotificationDelegate> delegate, |
| 102 base::Closure* cancel_callback) { | 103 base::Closure* cancel_callback) { |
| 103 if (auto* manager = GetLayoutTestNotificationManager()) | 104 if (auto* manager = GetLayoutTestNotificationManager()) |
| 104 manager->Show(params, delegate.Pass(), cancel_callback); | 105 manager->Show(params, delegate.Pass(), cancel_callback); |
| 105 } | 106 } |
| 106 | 107 |
| 107 } // namespace content | 108 } // namespace content |
| OLD | NEW |