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

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 557733002: [Android WebView] Use NetLog for providing full request headers to DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 "android_webview/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_browser_main_parts.h" 8 #include "android_webview/browser/aw_browser_main_parts.h"
9 #include "android_webview/browser/aw_browser_permission_request_delegate.h" 9 #include "android_webview/browser/aw_browser_permission_request_delegate.h"
10 #include "android_webview/browser/aw_contents_client_bridge_base.h" 10 #include "android_webview/browser/aw_contents_client_bridge_base.h"
(...skipping 12 matching lines...) Expand all
23 #include "content/public/browser/access_token_store.h" 23 #include "content/public/browser/access_token_store.h"
24 #include "content/public/browser/browser_message_filter.h" 24 #include "content/public/browser/browser_message_filter.h"
25 #include "content/public/browser/browser_thread.h" 25 #include "content/public/browser/browser_thread.h"
26 #include "content/public/browser/child_process_security_policy.h" 26 #include "content/public/browser/child_process_security_policy.h"
27 #include "content/public/browser/render_process_host.h" 27 #include "content/public/browser/render_process_host.h"
28 #include "content/public/browser/render_view_host.h" 28 #include "content/public/browser/render_view_host.h"
29 #include "content/public/browser/web_contents.h" 29 #include "content/public/browser/web_contents.h"
30 #include "content/public/common/url_constants.h" 30 #include "content/public/common/url_constants.h"
31 #include "content/public/common/web_preferences.h" 31 #include "content/public/common/web_preferences.h"
32 #include "net/android/network_library.h" 32 #include "net/android/network_library.h"
33 #include "net/base/net_log.h"
33 #include "net/ssl/ssl_cert_request_info.h" 34 #include "net/ssl/ssl_cert_request_info.h"
34 #include "net/ssl/ssl_info.h" 35 #include "net/ssl/ssl_info.h"
35 #include "ui/base/l10n/l10n_util_android.h" 36 #include "ui/base/l10n/l10n_util_android.h"
36 #include "ui/base/resource/resource_bundle.h" 37 #include "ui/base/resource/resource_bundle.h"
37 #include "ui/resources/grit/ui_resources.h" 38 #include "ui/resources/grit/ui_resources.h"
38 39
39 using content::BrowserThread; 40 using content::BrowserThread;
40 using content::ResourceType; 41 using content::ResourceType;
41 42
42 namespace android_webview { 43 namespace android_webview {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return AwBrowserContext::GetDefault(); 179 return AwBrowserContext::GetDefault();
179 } 180 }
180 181
181 AwContentBrowserClient::AwContentBrowserClient( 182 AwContentBrowserClient::AwContentBrowserClient(
182 JniDependencyFactory* native_factory) 183 JniDependencyFactory* native_factory)
183 : native_factory_(native_factory) { 184 : native_factory_(native_factory) {
184 base::FilePath user_data_dir; 185 base::FilePath user_data_dir;
185 if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) { 186 if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) {
186 NOTREACHED() << "Failed to get app data directory for Android WebView"; 187 NOTREACHED() << "Failed to get app data directory for Android WebView";
187 } 188 }
189 net_log_.reset(new net::NetLog());
188 browser_context_.reset( 190 browser_context_.reset(
189 new AwBrowserContext(user_data_dir, native_factory_)); 191 new AwBrowserContext(user_data_dir, native_factory_, net_log_.get()));
190 } 192 }
191 193
192 AwContentBrowserClient::~AwContentBrowserClient() { 194 AwContentBrowserClient::~AwContentBrowserClient() {
193 } 195 }
194 196
195 void AwContentBrowserClient::AddCertificate(net::CertificateMimeType cert_type, 197 void AwContentBrowserClient::AddCertificate(net::CertificateMimeType cert_type,
196 const void* cert_data, 198 const void* cert_data,
197 size_t cert_size, 199 size_t cert_size,
198 int render_process_id, 200 int render_process_id,
199 int render_frame_id) { 201 int render_frame_id) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 *no_javascript_access = false; 503 *no_javascript_access = false;
502 } 504 }
503 return true; 505 return true;
504 } 506 }
505 507
506 void AwContentBrowserClient::ResourceDispatcherHostCreated() { 508 void AwContentBrowserClient::ResourceDispatcherHostCreated() {
507 AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated(); 509 AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated();
508 } 510 }
509 511
510 net::NetLog* AwContentBrowserClient::GetNetLog() { 512 net::NetLog* AwContentBrowserClient::GetNetLog() {
511 // TODO(boliu): Implement AwNetLog. 513 return net_log_.get();
512 return NULL;
513 } 514 }
514 515
515 content::AccessTokenStore* AwContentBrowserClient::CreateAccessTokenStore() { 516 content::AccessTokenStore* AwContentBrowserClient::CreateAccessTokenStore() {
516 return new AwAccessTokenStore(); 517 return new AwAccessTokenStore();
517 } 518 }
518 519
519 bool AwContentBrowserClient::IsFastShutdownPossible() { 520 bool AwContentBrowserClient::IsFastShutdownPossible() {
520 NOTREACHED() << "Android WebView is single process, so IsFastShutdownPossible" 521 NOTREACHED() << "Android WebView is single process, so IsFastShutdownPossible"
521 << " should never be called"; 522 << " should never be called";
522 return false; 523 return false;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 575
575 #if defined(VIDEO_HOLE) 576 #if defined(VIDEO_HOLE)
576 content::ExternalVideoSurfaceContainer* 577 content::ExternalVideoSurfaceContainer*
577 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( 578 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
578 content::WebContents* web_contents) { 579 content::WebContents* web_contents) {
579 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); 580 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents);
580 } 581 }
581 #endif 582 #endif
582 583
583 } // namespace android_webview 584 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698