Chromium Code Reviews| 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" | |
| 116 #include "content/browser/media/android/media_player_renderer.h" | |
| 115 #include "content/public/browser/android/java_interfaces.h" | 117 #include "content/public/browser/android/java_interfaces.h" |
| 116 #include "content/browser/media/android/media_player_renderer.h" | |
| 117 #include "media/base/audio_renderer_sink.h" | 118 #include "media/base/audio_renderer_sink.h" |
| 118 #include "media/base/video_renderer_sink.h" | 119 #include "media/base/video_renderer_sink.h" |
| 119 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck | 120 #include "media/mojo/services/mojo_renderer_service.h" // nogncheck |
| 120 #endif | 121 #endif |
| 121 | 122 |
| 122 #if defined(OS_MACOSX) | 123 #if defined(OS_MACOSX) |
| 123 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 124 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 124 #endif | 125 #endif |
| 125 | 126 |
| 126 #if defined(ENABLE_WEBVR) | 127 #if defined(ENABLE_WEBVR) |
| 127 #include "device/vr/vr_service_impl.h" // nogncheck | 128 #include "device/vr/vr_service_impl.h" // nogncheck |
| 128 #else | 129 #else |
| 129 #include "device/vr/vr_service.mojom.h" // nogncheck | 130 #include "device/vr/vr_service.mojom.h" // nogncheck |
| 130 #endif | 131 #endif |
| 131 | 132 |
| 133 #if defined(OS_ANDROID) | |
| 134 const char kRenderFrameHostAndroidKey[] = "render_frame_host_android"; | |
|
boliu
2017/03/03 23:55:29
put this in anonymous namespace below
rwlbuis
2017/03/06 20:58:58
Done.
| |
| 135 #endif // OS_ANDROID | |
| 136 | |
| 132 using base::TimeDelta; | 137 using base::TimeDelta; |
| 133 | 138 |
| 134 namespace content { | 139 namespace content { |
| 135 | 140 |
| 136 namespace { | 141 namespace { |
| 137 | 142 |
| 138 // The next value to use for the accessibility reset token. | 143 // The next value to use for the accessibility reset token. |
| 139 int g_next_accessibility_reset_token = 1; | 144 int g_next_accessibility_reset_token = 1; |
| 140 | 145 |
| 141 // The next value to use for the javascript callback id. | 146 // The next value to use for the javascript callback id. |
| (...skipping 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3459 | 3464 |
| 3460 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3465 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3461 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3466 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3462 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3467 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3463 return NavigationHandleImpl::Create( | 3468 return NavigationHandleImpl::Create( |
| 3464 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3469 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
| 3465 params.was_within_same_page, base::TimeTicks::Now(), | 3470 params.was_within_same_page, base::TimeTicks::Now(), |
| 3466 entry_id_for_data_nav, false); // started_from_context_menu | 3471 entry_id_for_data_nav, false); // started_from_context_menu |
| 3467 } | 3472 } |
| 3468 | 3473 |
| 3474 #if defined(OS_ANDROID) | |
| 3475 base::android::ScopedJavaLocalRef<jobject> | |
| 3476 RenderFrameHostImpl::GetJavaRenderFrameHost() { | |
| 3477 RenderFrameHostAndroid* render_frame_host_android = | |
| 3478 static_cast<RenderFrameHostAndroid*>( | |
| 3479 GetUserData(kRenderFrameHostAndroidKey)); | |
| 3480 if (!render_frame_host_android) { | |
| 3481 render_frame_host_android = new RenderFrameHostAndroid(this); | |
| 3482 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); | |
| 3483 } | |
| 3484 return render_frame_host_android->GetJavaObject(); | |
| 3485 } | |
| 3486 #endif | |
| 3487 | |
| 3469 } // namespace content | 3488 } // namespace content |
| OLD | NEW |