| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #include "content/public/browser/stream_handle.h" | 70 #include "content/public/browser/stream_handle.h" |
| 71 #include "content/public/browser/user_metrics.h" | 71 #include "content/public/browser/user_metrics.h" |
| 72 #include "content/public/common/browser_side_navigation_policy.h" | 72 #include "content/public/common/browser_side_navigation_policy.h" |
| 73 #include "content/public/common/content_constants.h" | 73 #include "content/public/common/content_constants.h" |
| 74 #include "content/public/common/isolated_world_ids.h" | 74 #include "content/public/common/isolated_world_ids.h" |
| 75 #include "content/public/common/url_constants.h" | 75 #include "content/public/common/url_constants.h" |
| 76 #include "content/public/common/url_utils.h" | 76 #include "content/public/common/url_utils.h" |
| 77 #include "ui/accessibility/ax_tree.h" | 77 #include "ui/accessibility/ax_tree.h" |
| 78 #include "ui/accessibility/ax_tree_update.h" | 78 #include "ui/accessibility/ax_tree_update.h" |
| 79 #include "url/gurl.h" | 79 #include "url/gurl.h" |
| 80 #include "url/origin.h" |
| 80 | 81 |
| 81 #if defined(OS_ANDROID) | 82 #if defined(OS_ANDROID) |
| 82 #include "content/browser/mojo/service_registrar_android.h" | 83 #include "content/browser/mojo/service_registrar_android.h" |
| 83 #endif | 84 #endif |
| 84 | 85 |
| 85 #if defined(OS_MACOSX) | 86 #if defined(OS_MACOSX) |
| 86 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 87 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 87 #endif | 88 #endif |
| 88 | 89 |
| 89 #if defined(ENABLE_WEBVR) | 90 #if defined(ENABLE_WEBVR) |
| (...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2504 routing_id_, common_params, start_params, request_params)); | 2505 routing_id_, common_params, start_params, request_params)); |
| 2505 } | 2506 } |
| 2506 | 2507 |
| 2507 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 2508 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
| 2508 PermissionManager* permission_manager = | 2509 PermissionManager* permission_manager = |
| 2509 GetSiteInstance()->GetBrowserContext()->GetPermissionManager(); | 2510 GetSiteInstance()->GetBrowserContext()->GetPermissionManager(); |
| 2510 if (!permission_manager) | 2511 if (!permission_manager) |
| 2511 return; | 2512 return; |
| 2512 | 2513 |
| 2513 permission_manager->RegisterPermissionUsage( | 2514 permission_manager->RegisterPermissionUsage( |
| 2514 PermissionType::GEOLOCATION, | 2515 PermissionType::GEOLOCATION, url::Origin(last_committed_url()), |
| 2515 last_committed_url().GetOrigin(), | 2516 url::Origin(frame_tree_node() |
| 2516 frame_tree_node()->frame_tree()->GetMainFrame() | 2517 ->frame_tree() |
| 2517 ->last_committed_url().GetOrigin()); | 2518 ->GetMainFrame() |
| 2519 ->last_committed_url())); |
| 2518 } | 2520 } |
| 2519 | 2521 |
| 2520 void RenderFrameHostImpl::UpdatePermissionsForNavigation( | 2522 void RenderFrameHostImpl::UpdatePermissionsForNavigation( |
| 2521 const CommonNavigationParams& common_params, | 2523 const CommonNavigationParams& common_params, |
| 2522 const RequestNavigationParams& request_params) { | 2524 const RequestNavigationParams& request_params) { |
| 2523 // Browser plugin guests are not allowed to navigate outside web-safe schemes, | 2525 // Browser plugin guests are not allowed to navigate outside web-safe schemes, |
| 2524 // so do not grant them the ability to request additional URLs. | 2526 // so do not grant them the ability to request additional URLs. |
| 2525 if (!GetProcess()->IsForGuestsOnly()) { | 2527 if (!GetProcess()->IsForGuestsOnly()) { |
| 2526 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 2528 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
| 2527 GetProcess()->GetID(), common_params.url); | 2529 GetProcess()->GetID(), common_params.url); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2629 *dst = src; | 2631 *dst = src; |
| 2630 | 2632 |
| 2631 if (src.routing_id != -1) | 2633 if (src.routing_id != -1) |
| 2632 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2634 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
| 2633 | 2635 |
| 2634 if (src.parent_routing_id != -1) | 2636 if (src.parent_routing_id != -1) |
| 2635 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2637 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
| 2636 } | 2638 } |
| 2637 | 2639 |
| 2638 } // namespace content | 2640 } // namespace content |
| OLD | NEW |