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

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

Issue 2545323002: Implemented stub ShareService mojo service, for navigator.share. (Closed)
Patch Set: Comment and log cleanup. Created 4 years 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 "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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" 90 #include "chrome/browser/ui/blocked_content/blocked_window_params.h"
91 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 91 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
92 #include "chrome/browser/ui/browser_navigator.h" 92 #include "chrome/browser/ui/browser_navigator.h"
93 #include "chrome/browser/ui/browser_navigator_params.h" 93 #include "chrome/browser/ui/browser_navigator_params.h"
94 #include "chrome/browser/ui/chrome_select_file_policy.h" 94 #include "chrome/browser/ui/chrome_select_file_policy.h"
95 #include "chrome/browser/ui/sync/sync_promo_ui.h" 95 #include "chrome/browser/ui/sync/sync_promo_ui.h"
96 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 96 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
97 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 97 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
98 #include "chrome/browser/ui/webui/log_web_ui_url.h" 98 #include "chrome/browser/ui/webui/log_web_ui_url.h"
99 #include "chrome/browser/usb/usb_tab_helper.h" 99 #include "chrome/browser/usb/usb_tab_helper.h"
100 #include "chrome/browser/webshare/share_service_impl.h"
100 #include "chrome/common/channel_info.h" 101 #include "chrome/common/channel_info.h"
101 #include "chrome/common/chrome_constants.h" 102 #include "chrome/common/chrome_constants.h"
102 #include "chrome/common/chrome_paths.h" 103 #include "chrome/common/chrome_paths.h"
103 #include "chrome/common/chrome_switches.h" 104 #include "chrome/common/chrome_switches.h"
104 #include "chrome/common/env_vars.h" 105 #include "chrome/common/env_vars.h"
105 #include "chrome/common/features.h" 106 #include "chrome/common/features.h"
106 #include "chrome/common/logging_chrome.h" 107 #include "chrome/common/logging_chrome.h"
107 #include "chrome/common/origin_trials/chrome_origin_trial_policy.h" 108 #include "chrome/common/origin_trials/chrome_origin_trial_policy.h"
108 #include "chrome/common/pepper_permission_util.h" 109 #include "chrome/common/pepper_permission_util.h"
109 #include "chrome/common/pref_names.h" 110 #include "chrome/common/pref_names.h"
(...skipping 2925 matching lines...) Expand 10 before | Expand all | Expand 10 after
3035 content::WebContents* web_contents = 3036 content::WebContents* web_contents =
3036 content::WebContents::FromRenderFrameHost(render_frame_host); 3037 content::WebContents::FromRenderFrameHost(render_frame_host);
3037 if (web_contents) { 3038 if (web_contents) {
3038 registry->AddInterface( 3039 registry->AddInterface(
3039 web_contents->GetJavaInterfaces() 3040 web_contents->GetJavaInterfaces()
3040 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>()); 3041 ->CreateInterfaceFactory<blink::mojom::BarcodeDetection>());
3041 } 3042 }
3042 } 3043 }
3043 #endif 3044 #endif
3044 3045
3046 #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
Matt Giuca 2016/12/08 06:42:56 You shouldn't need OS_CHROMEOS because LINUX impli
constantina 2016/12/09 02:24:14 Done.
3047 if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) {
3048 registry->AddInterface(base::Bind(&ShareServiceImpl::Create));
3049 }
3050 #endif
3045 } 3051 }
3046 3052
3047 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( 3053 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
3048 service_manager::InterfaceRegistry* registry, 3054 service_manager::InterfaceRegistry* registry,
3049 content::GpuProcessHost* render_process_host) { 3055 content::GpuProcessHost* render_process_host) {
3050 registry->AddInterface( 3056 registry->AddInterface(
3051 base::Bind(&metrics::CallStackProfileCollector::Create, 3057 base::Bind(&metrics::CallStackProfileCollector::Create,
3052 metrics::CallStackProfileParams::GPU_PROCESS)); 3058 metrics::CallStackProfileParams::GPU_PROCESS));
3053 } 3059 }
3054 3060
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
3314 render_frame_host, std::move(source), std::move(request)); 3320 render_frame_host, std::move(source), std::move(request));
3315 #else 3321 #else
3316 // Chrome's media remoting implementation depends on the Media Router 3322 // Chrome's media remoting implementation depends on the Media Router
3317 // infrastructure to identify remote sinks and provide the user interface for 3323 // infrastructure to identify remote sinks and provide the user interface for
3318 // sink selection. In the case where the Media Router is not present, simply 3324 // sink selection. In the case where the Media Router is not present, simply
3319 // drop the interface request. This will prevent code paths for media remoting 3325 // drop the interface request. This will prevent code paths for media remoting
3320 // in the renderer process from activating. 3326 // in the renderer process from activating.
3321 #endif 3327 #endif
3322 } 3328 }
3323 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 3329 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698