| OLD | NEW |
| 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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 } | 669 } |
| 670 | 670 |
| 671 GpuModeManager* BrowserProcessImpl::gpu_mode_manager() { | 671 GpuModeManager* BrowserProcessImpl::gpu_mode_manager() { |
| 672 DCHECK(CalledOnValidThread()); | 672 DCHECK(CalledOnValidThread()); |
| 673 if (!gpu_mode_manager_.get()) | 673 if (!gpu_mode_manager_.get()) |
| 674 gpu_mode_manager_.reset(new GpuModeManager()); | 674 gpu_mode_manager_.reset(new GpuModeManager()); |
| 675 return gpu_mode_manager_.get(); | 675 return gpu_mode_manager_.get(); |
| 676 } | 676 } |
| 677 | 677 |
| 678 void BrowserProcessImpl::CreateDevToolsHttpProtocolHandler( | 678 void BrowserProcessImpl::CreateDevToolsHttpProtocolHandler( |
| 679 chrome::HostDesktopType host_desktop_type, | |
| 680 const std::string& ip, | 679 const std::string& ip, |
| 681 uint16_t port) { | 680 uint16_t port) { |
| 682 DCHECK(CalledOnValidThread()); | 681 DCHECK(CalledOnValidThread()); |
| 683 #if !defined(OS_ANDROID) | 682 #if !defined(OS_ANDROID) |
| 684 // StartupBrowserCreator::LaunchBrowser can be run multiple times when browser | 683 // StartupBrowserCreator::LaunchBrowser can be run multiple times when browser |
| 685 // is started with several profiles or existing browser process is reused. | 684 // is started with several profiles or existing browser process is reused. |
| 686 if (!remote_debugging_server_.get()) { | 685 if (!remote_debugging_server_.get()) { |
| 687 remote_debugging_server_.reset( | 686 remote_debugging_server_.reset(new RemoteDebuggingServer(ip, port)); |
| 688 new RemoteDebuggingServer(host_desktop_type, ip, port)); | |
| 689 } | 687 } |
| 690 #endif | 688 #endif |
| 691 } | 689 } |
| 692 | 690 |
| 693 bool BrowserProcessImpl::IsShuttingDown() { | 691 bool BrowserProcessImpl::IsShuttingDown() { |
| 694 DCHECK(CalledOnValidThread()); | 692 DCHECK(CalledOnValidThread()); |
| 695 // TODO(crbug.com/560486): Fix the tests that make the check of | 693 // TODO(crbug.com/560486): Fix the tests that make the check of |
| 696 // |tearing_down_| necessary here. | 694 // |tearing_down_| necessary here. |
| 697 return (did_start_ && 0 == module_ref_count_) || tearing_down_; | 695 return (did_start_ && 0 == module_ref_count_) || tearing_down_; |
| 698 } | 696 } |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 } | 1289 } |
| 1292 | 1290 |
| 1293 void BrowserProcessImpl::OnAutoupdateTimer() { | 1291 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1294 if (CanAutorestartForUpdate()) { | 1292 if (CanAutorestartForUpdate()) { |
| 1295 DLOG(WARNING) << "Detected update. Restarting browser."; | 1293 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1296 RestartBackgroundInstance(); | 1294 RestartBackgroundInstance(); |
| 1297 } | 1295 } |
| 1298 } | 1296 } |
| 1299 | 1297 |
| 1300 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1298 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |