| 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 return true; | 461 return true; |
| 462 } | 462 } |
| 463 #endif // !defined(OS_ANDROID) | 463 #endif // !defined(OS_ANDROID) |
| 464 | 464 |
| 465 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) { | 465 void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) { |
| 466 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { | 466 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { |
| 467 std::string port_str = | 467 std::string port_str = |
| 468 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); | 468 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); |
| 469 int port; | 469 int port; |
| 470 if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) { | 470 if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) { |
| 471 std::string frontend_str; | |
| 472 if (command_line.HasSwitch(::switches::kRemoteDebuggingFrontend)) { | |
| 473 frontend_str = command_line.GetSwitchValueASCII( | |
| 474 ::switches::kRemoteDebuggingFrontend); | |
| 475 } | |
| 476 g_browser_process->CreateDevToolsHttpProtocolHandler( | 471 g_browser_process->CreateDevToolsHttpProtocolHandler( |
| 477 chrome::HOST_DESKTOP_TYPE_NATIVE, | 472 chrome::HOST_DESKTOP_TYPE_NATIVE, |
| 478 "127.0.0.1", | 473 "127.0.0.1", |
| 479 port, | 474 port); |
| 480 frontend_str); | |
| 481 } else { | 475 } else { |
| 482 DLOG(WARNING) << "Invalid http debugger port number " << port; | 476 DLOG(WARNING) << "Invalid http debugger port number " << port; |
| 483 } | 477 } |
| 484 } | 478 } |
| 485 } | 479 } |
| 486 | 480 |
| 487 // Heap allocated class that listens for first page load, kicks off stat | 481 // Heap allocated class that listens for first page load, kicks off stat |
| 488 // recording and then deletes itself. | 482 // recording and then deletes itself. |
| 489 class LoadCompleteListener : public content::NotificationObserver { | 483 class LoadCompleteListener : public content::NotificationObserver { |
| 490 public: | 484 public: |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1684 chromeos::CrosSettings::Shutdown(); | 1678 chromeos::CrosSettings::Shutdown(); |
| 1685 #endif | 1679 #endif |
| 1686 #endif | 1680 #endif |
| 1687 } | 1681 } |
| 1688 | 1682 |
| 1689 // Public members: | 1683 // Public members: |
| 1690 | 1684 |
| 1691 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1685 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1692 chrome_extra_parts_.push_back(parts); | 1686 chrome_extra_parts_.push_back(parts); |
| 1693 } | 1687 } |
| OLD | NEW |