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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 1411203010: Separate RenderViewHost from RenderWidgetHost, part 4: delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops Created 5 years, 1 month 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } // namespace 146 } // namespace
147 147
148 // static 148 // static
149 AwContents* AwContents::FromWebContents(WebContents* web_contents) { 149 AwContents* AwContents::FromWebContents(WebContents* web_contents) {
150 DCHECK_CURRENTLY_ON(BrowserThread::UI); 150 DCHECK_CURRENTLY_ON(BrowserThread::UI);
151 return AwContentsUserData::GetContents(web_contents); 151 return AwContentsUserData::GetContents(web_contents);
152 } 152 }
153 153
154 // static 154 // static
155 AwContents* AwContents::FromID(int render_process_id, int render_view_id) { 155 AwContents* AwContents::FromID(int render_process_id, int render_view_id) {
156 const content::RenderViewHost* rvh = 156 content::RenderViewHost* rvh =
157 content::RenderViewHost::FromID(render_process_id, render_view_id); 157 content::RenderViewHost::FromID(render_process_id, render_view_id);
158 if (!rvh) return NULL; 158 if (!rvh) return NULL;
159 content::WebContents* web_contents = 159 content::WebContents* web_contents =
160 content::WebContents::FromRenderViewHost(rvh); 160 content::WebContents::FromRenderViewHost(rvh);
161 if (!web_contents) return NULL; 161 if (!web_contents) return NULL;
162 return FromWebContents(web_contents); 162 return FromWebContents(web_contents);
163 } 163 }
164 164
165 // static 165 // static
166 void SetLocale(JNIEnv* env, 166 void SetLocale(JNIEnv* env,
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( 1222 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
1223 web_contents_->GetRenderProcessHost()->GetID(), url::kFileScheme); 1223 web_contents_->GetRenderProcessHost()->GetID(), url::kFileScheme);
1224 } 1224 }
1225 1225
1226 void SetShouldDownloadFavicons(JNIEnv* env, 1226 void SetShouldDownloadFavicons(JNIEnv* env,
1227 const JavaParamRef<jclass>& jclazz) { 1227 const JavaParamRef<jclass>& jclazz) {
1228 g_should_download_favicons = true; 1228 g_should_download_favicons = true;
1229 } 1229 }
1230 1230
1231 } // namespace android_webview 1231 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698