| 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/browser/permissions/permission_service_context.h" | 5 #include "content/browser/permissions/permission_service_context.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "content/browser/permissions/permission_service_impl.h" | 9 #include "content/browser/permissions/permission_service_impl.h" |
| 10 #include "content/public/browser/navigation_details.h" | 10 #include "content/public/browser/navigation_details.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 BrowserContext* PermissionServiceContext::GetBrowserContext() const { | 77 BrowserContext* PermissionServiceContext::GetBrowserContext() const { |
| 78 if (!web_contents()) { | 78 if (!web_contents()) { |
| 79 DCHECK(render_process_host_); | 79 DCHECK(render_process_host_); |
| 80 return render_process_host_->GetBrowserContext(); | 80 return render_process_host_->GetBrowserContext(); |
| 81 } | 81 } |
| 82 return web_contents()->GetBrowserContext(); | 82 return web_contents()->GetBrowserContext(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 GURL PermissionServiceContext::GetEmbeddingOrigin() const { | 85 url::Origin PermissionServiceContext::GetEmbeddingOrigin() const { |
| 86 return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin() | 86 return web_contents() ? url::Origin(web_contents()->GetLastCommittedURL()) |
| 87 : GURL(); | 87 : url::Origin(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 RenderFrameHost* PermissionServiceContext::render_frame_host() const { | 90 RenderFrameHost* PermissionServiceContext::render_frame_host() const { |
| 91 return render_frame_host_; | 91 return render_frame_host_; |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace content | 94 } // namespace content |
| OLD | NEW |