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

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

Issue 273523007: Dispatch geolocation IPCs on the UI thread. Aside from simplifying the code to avoid a lot of threa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | android_webview/native/aw_geolocation_permission_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 int render_process_id = rfh->GetProcess()->GetID(); 128 int render_process_id = rfh->GetProcess()->GetID();
129 int render_frame_id = rfh->GetRoutingID(); 129 int render_frame_id = rfh->GetRoutingID();
130 AwResourceDispatcherHostDelegate::OnIoThreadClientReady( 130 AwResourceDispatcherHostDelegate::OnIoThreadClientReady(
131 render_process_id, render_frame_id); 131 render_process_id, render_frame_id);
132 } 132 }
133 133
134 } // namespace 134 } // namespace
135 135
136 // static 136 // static
137 AwContents* AwContents::FromWebContents(WebContents* web_contents) { 137 AwContents* AwContents::FromWebContents(WebContents* web_contents) {
138 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
138 return AwContentsUserData::GetContents(web_contents); 139 return AwContentsUserData::GetContents(web_contents);
139 } 140 }
140 141
141 // static 142 // static
142 AwContents* AwContents::FromID(int render_process_id, int render_view_id) { 143 AwContents* AwContents::FromID(int render_process_id, int render_view_id) {
143 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
144 const content::RenderViewHost* rvh = 144 const content::RenderViewHost* rvh =
145 content::RenderViewHost::FromID(render_process_id, render_view_id); 145 content::RenderViewHost::FromID(render_process_id, render_view_id);
146 if (!rvh) return NULL; 146 if (!rvh) return NULL;
147 content::WebContents* web_contents = 147 content::WebContents* web_contents =
148 content::WebContents::FromRenderViewHost(rvh); 148 content::WebContents::FromRenderViewHost(rvh);
149 if (!web_contents) return NULL; 149 if (!web_contents) return NULL;
150 return FromWebContents(web_contents); 150 return FromWebContents(web_contents);
151 } 151 }
152 152
153 AwContents::AwContents(scoped_ptr<WebContents> web_contents) 153 AwContents::AwContents(scoped_ptr<WebContents> web_contents)
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 return; 1097 return;
1098 1098
1099 browser_view_renderer_.TrimMemory(level, visible); 1099 browser_view_renderer_.TrimMemory(level, visible);
1100 } 1100 }
1101 1101
1102 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1102 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1103 g_should_download_favicons = true; 1103 g_should_download_favicons = true;
1104 } 1104 }
1105 1105
1106 } // namespace android_webview 1106 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/native/aw_geolocation_permission_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698