| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 #include "content/public/common/content_features.h" | 89 #include "content/public/common/content_features.h" |
| 90 #include "content/public/common/content_switches.h" | 90 #include "content/public/common/content_switches.h" |
| 91 #include "content/public/common/file_chooser_file_info.h" | 91 #include "content/public/common/file_chooser_file_info.h" |
| 92 #include "content/public/common/file_chooser_params.h" | 92 #include "content/public/common/file_chooser_params.h" |
| 93 #include "content/public/common/form_field_data.h" | 93 #include "content/public/common/form_field_data.h" |
| 94 #include "content/public/common/isolated_world_ids.h" | 94 #include "content/public/common/isolated_world_ids.h" |
| 95 #include "content/public/common/service_manager_connection.h" | 95 #include "content/public/common/service_manager_connection.h" |
| 96 #include "content/public/common/service_names.mojom.h" | 96 #include "content/public/common/service_names.mojom.h" |
| 97 #include "content/public/common/url_constants.h" | 97 #include "content/public/common/url_constants.h" |
| 98 #include "content/public/common/url_utils.h" | 98 #include "content/public/common/url_utils.h" |
| 99 #include "device/bluetooth/test/fake_bluetooth.h" |
| 99 #include "device/generic_sensor/sensor_provider_impl.h" | 100 #include "device/generic_sensor/sensor_provider_impl.h" |
| 100 #include "device/geolocation/geolocation_service_context.h" | 101 #include "device/geolocation/geolocation_service_context.h" |
| 101 #include "device/vibration/vibration_manager_impl.h" | 102 #include "device/vibration/vibration_manager_impl.h" |
| 102 #include "device/wake_lock/wake_lock_service_context.h" | 103 #include "device/wake_lock/wake_lock_service_context.h" |
| 103 #include "media/base/media_switches.h" | 104 #include "media/base/media_switches.h" |
| 104 #include "media/media_features.h" | 105 #include "media/media_features.h" |
| 105 #include "media/mojo/interfaces/media_service.mojom.h" | 106 #include "media/mojo/interfaces/media_service.mojom.h" |
| 106 #include "media/mojo/interfaces/remoting.mojom.h" | 107 #include "media/mojo/interfaces/remoting.mojom.h" |
| 107 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" | 108 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
| 108 #include "mojo/public/cpp/bindings/strong_binding.h" | 109 #include "mojo/public/cpp/bindings/strong_binding.h" |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2358 &content::CreateMediaPlayerRenderer, base::Unretained(this))); | 2359 &content::CreateMediaPlayerRenderer, base::Unretained(this))); |
| 2359 #else | 2360 #else |
| 2360 GetInterfaceRegistry()->AddInterface( | 2361 GetInterfaceRegistry()->AddInterface( |
| 2361 base::Bind(&device::VibrationManagerImpl::Create)); | 2362 base::Bind(&device::VibrationManagerImpl::Create)); |
| 2362 #endif // defined(OS_ANDROID) | 2363 #endif // defined(OS_ANDROID) |
| 2363 | 2364 |
| 2364 GetInterfaceRegistry()->AddInterface(base::Bind( | 2365 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2365 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService), | 2366 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService), |
| 2366 base::Unretained(this))); | 2367 base::Unretained(this))); |
| 2367 | 2368 |
| 2369 GetInterfaceRegistry()->AddInterface( |
| 2370 base::Bind(&bluetooth::FakeBluetooth::Create)); |
| 2371 |
| 2368 GetInterfaceRegistry()->AddInterface<media::mojom::InterfaceFactory>(this); | 2372 GetInterfaceRegistry()->AddInterface<media::mojom::InterfaceFactory>(this); |
| 2369 | 2373 |
| 2370 // This is to support usage of WebSockets in cases in which there is an | 2374 // This is to support usage of WebSockets in cases in which there is an |
| 2371 // associated RenderFrame. This is important for showing the correct security | 2375 // associated RenderFrame. This is important for showing the correct security |
| 2372 // state of the page and also honoring user override of bad certificates. | 2376 // state of the page and also honoring user override of bad certificates. |
| 2373 GetInterfaceRegistry()->AddInterface( | 2377 GetInterfaceRegistry()->AddInterface( |
| 2374 base::Bind(&WebSocketManager::CreateWebSocket, | 2378 base::Bind(&WebSocketManager::CreateWebSocket, |
| 2375 process_->GetID(), | 2379 process_->GetID(), |
| 2376 routing_id_)); | 2380 routing_id_)); |
| 2377 | 2381 |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3479 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3483 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3480 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3484 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3481 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3485 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3482 return NavigationHandleImpl::Create( | 3486 return NavigationHandleImpl::Create( |
| 3483 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3487 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
| 3484 params.was_within_same_page, base::TimeTicks::Now(), | 3488 params.was_within_same_page, base::TimeTicks::Now(), |
| 3485 entry_id_for_data_nav, false); // started_from_context_menu | 3489 entry_id_for_data_nav, false); // started_from_context_menu |
| 3486 } | 3490 } |
| 3487 | 3491 |
| 3488 } // namespace content | 3492 } // namespace content |
| OLD | NEW |