| 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_content_browser_client.h" | 5 #include "android_webview/browser/aw_content_browser_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 content::RenderViewHost* rvh, | 498 content::RenderViewHost* rvh, |
| 499 content::WebPreferences* web_prefs) { | 499 content::WebPreferences* web_prefs) { |
| 500 if (!preferences_populater_.get()) { | 500 if (!preferences_populater_.get()) { |
| 501 preferences_populater_ = | 501 preferences_populater_ = |
| 502 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater()); | 502 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater()); |
| 503 } | 503 } |
| 504 preferences_populater_->PopulateFor( | 504 preferences_populater_->PopulateFor( |
| 505 content::WebContents::FromRenderViewHost(rvh), web_prefs); | 505 content::WebContents::FromRenderViewHost(rvh), web_prefs); |
| 506 } | 506 } |
| 507 | 507 |
| 508 ScopedVector<content::NavigationThrottle> | 508 std::vector<std::unique_ptr<content::NavigationThrottle>> |
| 509 AwContentBrowserClient::CreateThrottlesForNavigation( | 509 AwContentBrowserClient::CreateThrottlesForNavigation( |
| 510 content::NavigationHandle* navigation_handle) { | 510 content::NavigationHandle* navigation_handle) { |
| 511 ScopedVector<content::NavigationThrottle> throttles; | 511 std::vector<std::unique_ptr<content::NavigationThrottle>> throttles; |
| 512 // We allow intercepting only navigations within main frames. This | 512 // We allow intercepting only navigations within main frames. This |
| 513 // is used to post onPageStarted. We handle shouldOverrideUrlLoading | 513 // is used to post onPageStarted. We handle shouldOverrideUrlLoading |
| 514 // via a sync IPC. | 514 // via a sync IPC. |
| 515 if (navigation_handle->IsInMainFrame()) { | 515 if (navigation_handle->IsInMainFrame()) { |
| 516 throttles.push_back( | 516 throttles.push_back( |
| 517 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( | 517 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( |
| 518 navigation_handle)); | 518 navigation_handle)); |
| 519 } | 519 } |
| 520 return throttles; | 520 return throttles; |
| 521 } | 521 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 549 render_frame_host)); | 549 render_frame_host)); |
| 550 | 550 |
| 551 // Although WebView does not support password manager feature, renderer code | 551 // Although WebView does not support password manager feature, renderer code |
| 552 // could still request this interface, so we register a dummy binder which | 552 // could still request this interface, so we register a dummy binder which |
| 553 // just drops the incoming request, to avoid the 'Failed to locate a binder | 553 // just drops the incoming request, to avoid the 'Failed to locate a binder |
| 554 // for interface' error log.. | 554 // for interface' error log.. |
| 555 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); | 555 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace android_webview | 558 } // namespace android_webview |
| OLD | NEW |