Chromium Code Reviews| Index: chrome/browser/chrome_browser_main.cc |
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
| index 89733288609659f236749b4ac5df8f9f6604c5d3..ba15b751d37dcf61d65af13c47717a08b8c5ad13 100644 |
| --- a/chrome/browser/chrome_browser_main.cc |
| +++ b/chrome/browser/chrome_browser_main.cc |
| @@ -235,6 +235,11 @@ |
| #include "ui/aura/env.h" |
| #endif // defined(USE_AURA) |
| +#if !defined(OS_ANDROID) && !defined(OS_IOS) |
| +#include "chrome/browser/chrome_webusb_browser_client.h" |
| +#include "components/webusb/webusb_detector.h" |
| +#endif |
| + |
| using content::BrowserThread; |
| namespace { |
| @@ -1140,6 +1145,15 @@ void ChromeBrowserMainParts::PostBrowserStart() { |
| base::TimeDelta::FromMinutes(1)); |
| #endif // defined(ENABLE_WEBRTC) |
| +#if !defined(OS_ANDROID) && !defined(OS_IOS) |
| + scoped_ptr<webusb::WebUsbBrowserClient> webusb_browser_client_ptr( |
| + new ChromeWebUsbBrowserClient()); |
| + if (webusb_browser_client_ptr->WebUsbNotificationEnabled()) { |
|
Reilly Grant (use Gerrit)
2015/08/21 17:23:02
Why does this condition only guard the call to Set
juncai
2015/08/21 20:18:27
Done.
|
| + webusb::WebUsbBrowserClient::Set(webusb_browser_client_ptr.release()); |
| + } |
| + webusb::WebUsbDetector::GetInstance(); |
| +#endif |
| + |
| // At this point, StartupBrowserCreator::Start has run creating initial |
| // browser windows and tabs, but no progress has been made in loading |
| // content as the main message loop hasn't started processing tasks yet. |