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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2788823002: Add the Mojo implementation of authenticator.mojom's MakeCredential. (Closed)
Patch Set: Addressing mkwst comments Created 3 years, 6 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/webauth/DEPS » ('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 (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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" 92 #include "chrome/browser/ui/blocked_content/blocked_window_params.h"
93 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 93 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
94 #include "chrome/browser/ui/browser_navigator.h" 94 #include "chrome/browser/ui/browser_navigator.h"
95 #include "chrome/browser/ui/browser_navigator_params.h" 95 #include "chrome/browser/ui/browser_navigator_params.h"
96 #include "chrome/browser/ui/chrome_select_file_policy.h" 96 #include "chrome/browser/ui/chrome_select_file_policy.h"
97 #include "chrome/browser/ui/sync/sync_promo_ui.h" 97 #include "chrome/browser/ui/sync/sync_promo_ui.h"
98 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 98 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
99 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 99 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
100 #include "chrome/browser/ui/webui/log_web_ui_url.h" 100 #include "chrome/browser/ui/webui/log_web_ui_url.h"
101 #include "chrome/browser/usb/usb_tab_helper.h" 101 #include "chrome/browser/usb/usb_tab_helper.h"
102 #include "chrome/browser/webauth/authenticator_web_contents_manager.h"
102 #include "chrome/common/channel_info.h" 103 #include "chrome/common/channel_info.h"
103 #include "chrome/common/chrome_constants.h" 104 #include "chrome/common/chrome_constants.h"
104 #include "chrome/common/chrome_features.h" 105 #include "chrome/common/chrome_features.h"
105 #include "chrome/common/chrome_paths.h" 106 #include "chrome/common/chrome_paths.h"
106 #include "chrome/common/chrome_switches.h" 107 #include "chrome/common/chrome_switches.h"
107 #include "chrome/common/env_vars.h" 108 #include "chrome/common/env_vars.h"
108 #include "chrome/common/features.h" 109 #include "chrome/common/features.h"
109 #include "chrome/common/logging_chrome.h" 110 #include "chrome/common/logging_chrome.h"
110 #include "chrome/common/origin_trials/chrome_origin_trial_policy.h" 111 #include "chrome/common/origin_trials/chrome_origin_trial_policy.h"
111 #include "chrome/common/pepper_permission_util.h" 112 #include "chrome/common/pepper_permission_util.h"
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 } 884 }
884 } 885 }
885 // The forbidden app URL was being opened by a different app or extension. 886 // The forbidden app URL was being opened by a different app or extension.
886 return APP_LOADED_IN_TAB_SOURCE_OTHER_EXTENSION; 887 return APP_LOADED_IN_TAB_SOURCE_OTHER_EXTENSION;
887 } 888 }
888 // The forbidden app URL was being opened by a non-extension page (e.g. http). 889 // The forbidden app URL was being opened by a non-extension page (e.g. http).
889 return APP_LOADED_IN_TAB_SOURCE_OTHER; 890 return APP_LOADED_IN_TAB_SOURCE_OTHER;
890 } 891 }
891 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 892 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
892 893
894 void CreateAuthenticatorForWebContents(
895 content::RenderFrameHost* render_frame_host,
896 const service_manager::BindSourceInfo& source_info,
897 webauth::mojom::AuthenticatorRequest request) {
898 content::WebContents* web_contents =
899 content::WebContents::FromRenderFrameHost(render_frame_host);
900 DCHECK(web_contents);
901 AuthenticatorWebContentsManager::GetOrCreateForWebContents(web_contents)
902 ->CreateAuthenticator(render_frame_host, std::move(request));
903 }
904
893 void CreateUsbDeviceManager(RenderFrameHost* render_frame_host, 905 void CreateUsbDeviceManager(RenderFrameHost* render_frame_host,
894 const service_manager::BindSourceInfo& source_info, 906 const service_manager::BindSourceInfo& source_info,
895 device::mojom::UsbDeviceManagerRequest request) { 907 device::mojom::UsbDeviceManagerRequest request) {
896 WebContents* web_contents = 908 WebContents* web_contents =
897 WebContents::FromRenderFrameHost(render_frame_host); 909 WebContents::FromRenderFrameHost(render_frame_host);
898 if (!web_contents) { 910 if (!web_contents) {
899 NOTREACHED(); 911 NOTREACHED();
900 return; 912 return;
901 } 913 }
902 914
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 if (base::FeatureList::IsEnabled(features::kWebPayments)) { 3201 if (base::FeatureList::IsEnabled(features::kWebPayments)) {
3190 content::WebContents* web_contents = 3202 content::WebContents* web_contents =
3191 content::WebContents::FromRenderFrameHost(render_frame_host); 3203 content::WebContents::FromRenderFrameHost(render_frame_host);
3192 if (web_contents) { 3204 if (web_contents) {
3193 registry->AddInterface(base::Bind(payments::CreatePaymentRequest, 3205 registry->AddInterface(base::Bind(payments::CreatePaymentRequest,
3194 render_frame_host, web_contents)); 3206 render_frame_host, web_contents));
3195 } 3207 }
3196 } 3208 }
3197 #endif 3209 #endif
3198 3210
3211 if (base::FeatureList::IsEnabled(features::kWebAuth)) {
3212 registry->AddInterface(
3213 base::Bind(&CreateAuthenticatorForWebContents, render_frame_host));
3214 }
3215
3199 #if defined(OS_LINUX) || defined(OS_WIN) 3216 #if defined(OS_LINUX) || defined(OS_WIN)
3200 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { 3217 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) {
3201 registry->AddInterface(base::Bind(&ShareServiceImpl::Create)); 3218 registry->AddInterface(base::Bind(&ShareServiceImpl::Create));
3202 } 3219 }
3203 #endif 3220 #endif
3204 } 3221 }
3205 3222
3206 void ChromeContentBrowserClient::BindInterfaceRequest( 3223 void ChromeContentBrowserClient::BindInterfaceRequest(
3207 const service_manager::BindSourceInfo& source_info, 3224 const service_manager::BindSourceInfo& source_info,
3208 const std::string& interface_name, 3225 const std::string& interface_name,
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3576 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3593 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3577 return variations::GetVariationParamValue( 3594 return variations::GetVariationParamValue(
3578 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3595 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3579 } 3596 }
3580 3597
3581 // static 3598 // static
3582 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3599 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3583 const storage::QuotaSettings* settings) { 3600 const storage::QuotaSettings* settings) {
3584 g_default_quota_settings = settings; 3601 g_default_quota_settings = settings;
3585 } 3602 }
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/webauth/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698