Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2681933002: Add Java wrapper for RenderFrameHost (Closed)
Patch Set: Make test work with PlzNavigate Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
132 using base::TimeDelta; 133 using base::TimeDelta;
133 134
134 namespace content { 135 namespace content {
135 136
136 namespace { 137 namespace {
137 138
139 #if defined(OS_ANDROID)
140 const void* const kRenderFrameHostAndroidKey = &kRenderFrameHostAndroidKey;
141 #endif // OS_ANDROID
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.
142 int g_next_javascript_callback_id = 1; 147 int g_next_javascript_callback_id = 1;
143 148
144 // Whether to allow injecting javascript into any kind of frame (for Android 149 // Whether to allow injecting javascript into any kind of frame (for Android
145 // WebView). 150 // WebView).
146 bool g_allow_injecting_javascript = false; 151 bool g_allow_injecting_javascript = false;
147 152
(...skipping 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after
3455 3460
3456 // 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
3457 // 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
3458 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3463 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3459 return NavigationHandleImpl::Create( 3464 return NavigationHandleImpl::Create(
3460 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3465 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3461 params.was_within_same_page, base::TimeTicks::Now(), 3466 params.was_within_same_page, base::TimeTicks::Now(),
3462 entry_id_for_data_nav, false); // started_from_context_menu 3467 entry_id_for_data_nav, false); // started_from_context_menu
3463 } 3468 }
3464 3469
3470 #if defined(OS_ANDROID)
3471 base::android::ScopedJavaLocalRef<jobject>
3472 RenderFrameHostImpl::GetJavaRenderFrameHost() {
3473 RenderFrameHostAndroid* render_frame_host_android =
3474 static_cast<RenderFrameHostAndroid*>(
3475 GetUserData(kRenderFrameHostAndroidKey));
3476 if (!render_frame_host_android) {
3477 render_frame_host_android = new RenderFrameHostAndroid(this);
3478 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android);
3479 }
3480 return render_frame_host_android->GetJavaObject();
3481 }
3482 #endif
3483
3465 } // namespace content 3484 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/web_contents/web_contents_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698