| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 #include "mojo/public/cpp/bindings/strong_binding.h" | 105 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 106 #include "services/service_manager/public/cpp/connector.h" | 106 #include "services/service_manager/public/cpp/connector.h" |
| 107 #include "services/service_manager/public/cpp/interface_provider.h" | 107 #include "services/service_manager/public/cpp/interface_provider.h" |
| 108 #include "ui/accessibility/ax_tree.h" | 108 #include "ui/accessibility/ax_tree.h" |
| 109 #include "ui/accessibility/ax_tree_id_registry.h" | 109 #include "ui/accessibility/ax_tree_id_registry.h" |
| 110 #include "ui/accessibility/ax_tree_update.h" | 110 #include "ui/accessibility/ax_tree_update.h" |
| 111 #include "ui/gfx/geometry/quad_f.h" | 111 #include "ui/gfx/geometry/quad_f.h" |
| 112 #include "url/gurl.h" | 112 #include "url/gurl.h" |
| 113 | 113 |
| 114 #if defined(OS_ANDROID) | 114 #if defined(OS_ANDROID) |
| 115 #include "content/browser/frame_host/render_frame_host_android.h" | 115 #include "content/public/browser/android/java_interfaces.h" |
| 116 #include "content/browser/media/android/media_player_renderer.h" | 116 #include "content/browser/media/android/media_player_renderer.h" |
| 117 #include "content/public/browser/android/java_interfaces.h" | |
| 118 #include "media/base/audio_renderer_sink.h" | 117 #include "media/base/audio_renderer_sink.h" |
| 119 #include "media/base/video_renderer_sink.h" | 118 #include "media/base/video_renderer_sink.h" |
| 120 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck | 119 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck |
| 121 #endif | 120 #endif |
| 122 | 121 |
| 123 #if defined(OS_MACOSX) | 122 #if defined(OS_MACOSX) |
| 124 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 123 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 125 #endif | 124 #endif |
| 126 | 125 |
| 127 #if defined(ENABLE_WEBVR) | 126 #if defined(ENABLE_WEBVR) |
| 128 #include "device/vr/vr_service_impl.h" // nogncheck | 127 #include "device/vr/vr_service_impl.h" // nogncheck |
| 129 #else | 128 #else |
| 130 #include "device/vr/vr_service.mojom.h" // nogncheck | 129 #include "device/vr/vr_service.mojom.h" // nogncheck |
| 131 #endif | 130 #endif |
| 132 | 131 |
| 133 using base::TimeDelta; | 132 using base::TimeDelta; |
| 134 | 133 |
| 135 namespace content { | 134 namespace content { |
| 136 | 135 |
| 137 namespace { | 136 namespace { |
| 138 | 137 |
| 139 #if defined(OS_ANDROID) | |
| 140 const void* const kRenderFrameHostAndroidKey = &kRenderFrameHostAndroidKey; | |
| 141 #endif // OS_ANDROID | |
| 142 | |
| 143 // The next value to use for the accessibility reset token. | 138 // The next value to use for the accessibility reset token. |
| 144 int g_next_accessibility_reset_token = 1; | 139 int g_next_accessibility_reset_token = 1; |
| 145 | 140 |
| 146 // The next value to use for the javascript callback id. | 141 // The next value to use for the javascript callback id. |
| 147 int g_next_javascript_callback_id = 1; | 142 int g_next_javascript_callback_id = 1; |
| 148 | 143 |
| 149 // Whether to allow injecting javascript into any kind of frame (for Android | 144 // Whether to allow injecting javascript into any kind of frame (for Android |
| 150 // WebView). | 145 // WebView). |
| 151 bool g_allow_injecting_javascript = false; | 146 bool g_allow_injecting_javascript = false; |
| 152 | 147 |
| (...skipping 3312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3465 | 3460 |
| 3466 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3461 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3467 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3462 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3468 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3463 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3469 return NavigationHandleImpl::Create( | 3464 return NavigationHandleImpl::Create( |
| 3470 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3465 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
| 3471 params.was_within_same_page, base::TimeTicks::Now(), | 3466 params.was_within_same_page, base::TimeTicks::Now(), |
| 3472 entry_id_for_data_nav, false); // started_from_context_menu | 3467 entry_id_for_data_nav, false); // started_from_context_menu |
| 3473 } | 3468 } |
| 3474 | 3469 |
| 3475 #if defined(OS_ANDROID) | |
| 3476 base::android::ScopedJavaLocalRef<jobject> | |
| 3477 RenderFrameHostImpl::GetJavaRenderFrameHost() { | |
| 3478 RenderFrameHostAndroid* render_frame_host_android = | |
| 3479 static_cast<RenderFrameHostAndroid*>( | |
| 3480 GetUserData(kRenderFrameHostAndroidKey)); | |
| 3481 if (!render_frame_host_android) { | |
| 3482 render_frame_host_android = new RenderFrameHostAndroid(this); | |
| 3483 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); | |
| 3484 } | |
| 3485 return render_frame_host_android->GetJavaObject(); | |
| 3486 } | |
| 3487 #endif | |
| 3488 | |
| 3489 } // namespace content | 3470 } // namespace content |
| OLD | NEW |