OLD | NEW |
---|---|
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 "android_webview/browser/aw_browser_context.h" | 5 #include "android_webview/browser/aw_browser_context.h" |
6 | 6 |
7 #include "android_webview/browser/aw_form_database_service.h" | 7 #include "android_webview/browser/aw_form_database_service.h" |
8 #include "android_webview/browser/aw_pref_store.h" | 8 #include "android_webview/browser/aw_pref_store.h" |
9 #include "android_webview/browser/aw_quota_manager_bridge.h" | 9 #include "android_webview/browser/aw_quota_manager_bridge.h" |
10 #include "android_webview/browser/jni_dependency_factory.h" | 10 #include "android_webview/browser/jni_dependency_factory.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 // static | 80 // static |
81 AwBrowserContext* AwBrowserContext::FromWebContents( | 81 AwBrowserContext* AwBrowserContext::FromWebContents( |
82 content::WebContents* web_contents) { | 82 content::WebContents* web_contents) { |
83 // This is safe; this is the only implementation of the browser context. | 83 // This is safe; this is the only implementation of the browser context. |
84 return static_cast<AwBrowserContext*>(web_contents->GetBrowserContext()); | 84 return static_cast<AwBrowserContext*>(web_contents->GetBrowserContext()); |
85 } | 85 } |
86 | 86 |
87 void AwBrowserContext::InitializeBeforeThreadCreation() { | 87 void AwBrowserContext::InitializeBeforeThreadCreation() { |
88 DCHECK(!url_request_context_getter_.get()); | 88 DCHECK(!url_request_context_getter_.get()); |
89 url_request_context_getter_ = new AwURLRequestContextGetter(this); | 89 url_request_context_getter_ = new AwURLRequestContextGetter(this); |
90 url_request_context_getter_->InitializeOnUiThread(); | |
awong
2013/07/11 20:43:48
I think we have to move this into PreMainMessageLo
Maria
2013/07/11 21:11:37
I think you are correct that I cannot be creating
| |
90 } | 91 } |
91 | 92 |
92 void AwBrowserContext::PreMainMessageLoopRun() { | 93 void AwBrowserContext::PreMainMessageLoopRun() { |
93 visitedlink_master_.reset( | 94 visitedlink_master_.reset( |
94 new visitedlink::VisitedLinkMaster(this, this, false)); | 95 new visitedlink::VisitedLinkMaster(this, this, false)); |
95 visitedlink_master_->Init(); | 96 visitedlink_master_->Init(); |
96 } | 97 } |
97 | 98 |
98 void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) { | 99 void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) { |
99 DCHECK(visitedlink_master_); | 100 DCHECK(visitedlink_master_); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
230 | 231 |
231 void AwBrowserContext::RebuildTable( | 232 void AwBrowserContext::RebuildTable( |
232 const scoped_refptr<URLEnumerator>& enumerator) { | 233 const scoped_refptr<URLEnumerator>& enumerator) { |
233 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 234 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
234 // can change in the lifetime of this WebView and may not yet be set here. | 235 // can change in the lifetime of this WebView and may not yet be set here. |
235 // Therefore this initialization path is not used. | 236 // Therefore this initialization path is not used. |
236 enumerator->OnComplete(true); | 237 enumerator->OnComplete(true); |
237 } | 238 } |
238 | 239 |
239 } // namespace android_webview | 240 } // namespace android_webview |
OLD | NEW |