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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 chromeos::CrosSettings::Shutdown(); | 1684 chromeos::CrosSettings::Shutdown(); |
1691 #endif | 1685 #endif |
1692 #endif | 1686 #endif |
1693 } | 1687 } |
1694 | 1688 |
1695 // Public members: | 1689 // Public members: |
1696 | 1690 |
1697 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1691 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1698 chrome_extra_parts_.push_back(parts); | 1692 chrome_extra_parts_.push_back(parts); |
1699 } | 1693 } |
OLD | NEW |