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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2681933002: Add Java wrapper for RenderFrameHost (Closed)
Patch Set: Try to address all review comments 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 5031 matching lines...) Expand 10 before | Expand all | Expand 10 after
5042 } 5042 }
5043 5043
5044 #if defined(OS_ANDROID) 5044 #if defined(OS_ANDROID)
5045 5045
5046 base::android::ScopedJavaLocalRef<jobject> 5046 base::android::ScopedJavaLocalRef<jobject>
5047 WebContentsImpl::GetJavaWebContents() { 5047 WebContentsImpl::GetJavaWebContents() {
5048 DCHECK_CURRENTLY_ON(BrowserThread::UI); 5048 DCHECK_CURRENTLY_ON(BrowserThread::UI);
5049 return GetWebContentsAndroid()->GetJavaObject(); 5049 return GetWebContentsAndroid()->GetJavaObject();
5050 } 5050 }
5051 5051
5052 base::android::ScopedJavaLocalRef<jobject>
5053 WebContentsImpl::GetJavaRenderFrameHostDelegate() {
5054 return GetJavaWebContents();
5055 }
5056
5052 WebContentsAndroid* WebContentsImpl::GetWebContentsAndroid() { 5057 WebContentsAndroid* WebContentsImpl::GetWebContentsAndroid() {
5053 WebContentsAndroid* web_contents_android = 5058 WebContentsAndroid* web_contents_android =
5054 static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey)); 5059 static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey));
5055 if (!web_contents_android) { 5060 if (!web_contents_android) {
5056 web_contents_android = new WebContentsAndroid(this); 5061 web_contents_android = new WebContentsAndroid(this);
5057 SetUserData(kWebContentsAndroidKey, web_contents_android); 5062 SetUserData(kWebContentsAndroidKey, web_contents_android);
5058 } 5063 }
5059 return web_contents_android; 5064 return web_contents_android;
5060 } 5065 }
5061 5066
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
5419 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); 5424 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host);
5420 if (!render_view_host) 5425 if (!render_view_host)
5421 continue; 5426 continue;
5422 render_view_host_set.insert(render_view_host); 5427 render_view_host_set.insert(render_view_host);
5423 } 5428 }
5424 for (RenderViewHost* render_view_host : render_view_host_set) 5429 for (RenderViewHost* render_view_host : render_view_host_set)
5425 render_view_host->OnWebkitPreferencesChanged(); 5430 render_view_host->OnWebkitPreferencesChanged();
5426 } 5431 }
5427 5432
5428 } // namespace content 5433 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698