OLD | NEW |
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 return g_locale; | 173 return g_locale; |
174 } | 174 } |
175 | 175 |
176 // static | 176 // static |
177 AwBrowserPermissionRequestDelegate* AwBrowserPermissionRequestDelegate::FromID( | 177 AwBrowserPermissionRequestDelegate* AwBrowserPermissionRequestDelegate::FromID( |
178 int render_process_id, int render_frame_id) { | 178 int render_process_id, int render_frame_id) { |
179 AwContents* aw_contents = AwContents::FromWebContents( | 179 AwContents* aw_contents = AwContents::FromWebContents( |
180 content::WebContents::FromRenderFrameHost( | 180 content::WebContents::FromRenderFrameHost( |
181 content::RenderFrameHost::FromID(render_process_id, | 181 content::RenderFrameHost::FromID(render_process_id, |
182 render_frame_id))); | 182 render_frame_id))); |
183 return implicit_cast<AwBrowserPermissionRequestDelegate*>(aw_contents); | 183 return aw_contents; |
184 } | 184 } |
185 | 185 |
186 AwContents::AwContents(scoped_ptr<WebContents> web_contents) | 186 AwContents::AwContents(scoped_ptr<WebContents> web_contents) |
187 : web_contents_(web_contents.Pass()), | 187 : web_contents_(web_contents.Pass()), |
188 browser_view_renderer_( | 188 browser_view_renderer_( |
189 this, | 189 this, |
190 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)), | 190 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)), |
191 renderer_manager_key_(GLViewRendererManager::GetInstance()->NullKey()) { | 191 renderer_manager_key_(GLViewRendererManager::GetInstance()->NullKey()) { |
192 base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, 1); | 192 base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, 1); |
193 icon_helper_.reset(new IconHelper(web_contents_.get())); | 193 icon_helper_.reset(new IconHelper(web_contents_.get())); |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 1216 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
1217 web_contents_->GetRenderProcessHost()->GetID(), url::kFileScheme); | 1217 web_contents_->GetRenderProcessHost()->GetID(), url::kFileScheme); |
1218 } | 1218 } |
1219 | 1219 |
1220 void SetShouldDownloadFavicons(JNIEnv* env, | 1220 void SetShouldDownloadFavicons(JNIEnv* env, |
1221 const JavaParamRef<jclass>& jclazz) { | 1221 const JavaParamRef<jclass>& jclazz) { |
1222 g_should_download_favicons = true; | 1222 g_should_download_favicons = true; |
1223 } | 1223 } |
1224 | 1224 |
1225 } // namespace android_webview | 1225 } // namespace android_webview |
OLD | NEW |