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

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

Issue 2146663002: Move //components/webusb/ to //chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix variable names Created 4 years, 5 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
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_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 #if defined(ENABLE_WEBRTC) 251 #if defined(ENABLE_WEBRTC)
252 #include "chrome/browser/media/webrtc_log_util.h" 252 #include "chrome/browser/media/webrtc_log_util.h"
253 #endif // defined(ENABLE_WEBRTC) 253 #endif // defined(ENABLE_WEBRTC)
254 254
255 #if defined(USE_AURA) 255 #if defined(USE_AURA)
256 #include "ui/aura/env.h" 256 #include "ui/aura/env.h"
257 #endif // defined(USE_AURA) 257 #endif // defined(USE_AURA)
258 258
259 #if !defined(OS_ANDROID) 259 #if !defined(OS_ANDROID)
260 #include "chrome/browser/chrome_webusb_browser_client.h" 260 #include "chrome/browser/chrome_web_usb_browser_client.h"
261 #include "components/webusb/webusb_detector.h" 261 #include "chrome/browser/usb/web_usb_detector.h"
262 #endif 262 #endif
263 263
264 #if defined(MOJO_SHELL_CLIENT) 264 #if defined(MOJO_SHELL_CLIENT)
265 #include "chrome/browser/lifetime/application_lifetime.h" 265 #include "chrome/browser/lifetime/application_lifetime.h"
266 #include "content/public/common/mojo_shell_connection.h" 266 #include "content/public/common/mojo_shell_connection.h"
267 #include "services/shell/runner/common/client_util.h" 267 #include "services/shell/runner/common/client_util.h"
268 #endif 268 #endif
269 269
270 using content::BrowserThread; 270 using content::BrowserThread;
271 271
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 base::TimeDelta::FromMinutes(1)); 1359 base::TimeDelta::FromMinutes(1));
1360 #endif // defined(ENABLE_WEBRTC) 1360 #endif // defined(ENABLE_WEBRTC)
1361 1361
1362 #if !defined(OS_ANDROID) 1362 #if !defined(OS_ANDROID)
1363 // WebUSB is an experimental web API. The sites these notifications will link 1363 // WebUSB is an experimental web API. The sites these notifications will link
1364 // to will only work if the experiment is enabled and WebUSB feature is 1364 // to will only work if the experiment is enabled and WebUSB feature is
1365 // enabled. 1365 // enabled.
1366 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1366 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1367 switches::kEnableExperimentalWebPlatformFeatures) && 1367 switches::kEnableExperimentalWebPlatformFeatures) &&
1368 base::FeatureList::IsEnabled(features::kWebUsb)) { 1368 base::FeatureList::IsEnabled(features::kWebUsb)) {
1369 webusb_browser_client_.reset(new ChromeWebUsbBrowserClient()); 1369 web_usb_browser_client_.reset(new ChromeWebUsbBrowserClient());
1370 webusb_detector_.reset( 1370 web_usb_detector_.reset(new WebUsbDetector(web_usb_browser_client_.get()));
1371 new webusb::WebUsbDetector(webusb_browser_client_.get()));
1372 } 1371 }
1373 #endif 1372 #endif
1374 1373
1375 // At this point, StartupBrowserCreator::Start has run creating initial 1374 // At this point, StartupBrowserCreator::Start has run creating initial
1376 // browser windows and tabs, but no progress has been made in loading 1375 // browser windows and tabs, but no progress has been made in loading
1377 // content as the main message loop hasn't started processing tasks yet. 1376 // content as the main message loop hasn't started processing tasks yet.
1378 // We setup to observe to the initial page load here to defer running 1377 // We setup to observe to the initial page load here to defer running
1379 // task posted via PostAfterStartupTask until its complete. 1378 // task posted via PostAfterStartupTask until its complete.
1380 AfterStartupTaskUtils::StartMonitoringStartup(); 1379 AfterStartupTaskUtils::StartMonitoringStartup();
1381 } 1380 }
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 g_browser_process->local_state()); 1963 g_browser_process->local_state());
1965 shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300)); 1964 shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300));
1966 1965
1967 // Disarm the startup hang detector time bomb if it is still Arm'ed. 1966 // Disarm the startup hang detector time bomb if it is still Arm'ed.
1968 startup_watcher_->Disarm(); 1967 startup_watcher_->Disarm();
1969 1968
1970 // Remove observers attached to D-Bus clients before DbusThreadManager is 1969 // Remove observers attached to D-Bus clients before DbusThreadManager is
1971 // shut down. 1970 // shut down.
1972 process_power_collector_.reset(); 1971 process_power_collector_.reset();
1973 1972
1974 webusb_detector_.reset(); 1973 web_usb_detector_.reset();
1975 webusb_browser_client_.reset(); 1974 web_usb_browser_client_.reset();
1976 1975
1977 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1976 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1978 chrome_extra_parts_[i]->PostMainMessageLoopRun(); 1977 chrome_extra_parts_[i]->PostMainMessageLoopRun();
1979 1978
1980 // Some tests don't set parameters.ui_task, so they started translate 1979 // Some tests don't set parameters.ui_task, so they started translate
1981 // language fetch that was never completed so we need to cleanup here 1980 // language fetch that was never completed so we need to cleanup here
1982 // otherwise it will be done by the destructor in a wrong thread. 1981 // otherwise it will be done by the destructor in a wrong thread.
1983 TranslateService::Shutdown(parameters().ui_task == NULL); 1982 TranslateService::Shutdown(parameters().ui_task == NULL);
1984 1983
1985 if (notify_result_ == ProcessSingleton::PROCESS_NONE) 1984 if (notify_result_ == ProcessSingleton::PROCESS_NONE)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 chromeos::CrosSettings::Shutdown(); 2037 chromeos::CrosSettings::Shutdown();
2039 #endif // defined(OS_CHROMEOS) 2038 #endif // defined(OS_CHROMEOS)
2040 #endif // defined(OS_ANDROID) 2039 #endif // defined(OS_ANDROID)
2041 } 2040 }
2042 2041
2043 // Public members: 2042 // Public members:
2044 2043
2045 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2044 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2046 chrome_extra_parts_.push_back(parts); 2045 chrome_extra_parts_.push_back(parts);
2047 } 2046 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698