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 eb0cf4f30c8fb1a4bb321659c332e3e300f3173a..c51496bc7a9ca204a4ef6dbd22cda92d0fe259dc 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 { |
| @@ -1164,6 +1169,14 @@ void ChromeBrowserMainParts::PostBrowserStart() { |
| base::TimeDelta::FromMinutes(1)); |
| #endif // defined(ENABLE_WEBRTC) |
| +#if !defined(OS_ANDROID) && !defined(OS_IOS) |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableWebUsbNotifications)) { |
| + webusb::WebUsbBrowserClient::Set(new ChromeWebUsbBrowserClient()); |
| + webusb::WebUsbDetector::Set(new webusb::WebUsbDetector()); |
|
stevenjb
2015/08/27 16:56:02
Where do these get destroyed? Do they actually nee
Reilly Grant (use Gerrit)
2015/08/27 17:03:00
They should be owned by ChromeBrowserMainParts.
juncai
2015/08/28 01:15:52
Done.
|
| + } |
| +#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. |