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

Side by Side Diff: content/shell/shell_browser_main_parts.cc

Issue 11033046: DevTools: [remote debugging] introduce json/new and json/close for creating and closing the tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing anroid_dbg Created 8 years, 2 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 | Annotate | Revision Log
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 "content/shell/shell_browser_main_parts.h" 5 #include "content/shell/shell_browser_main_parts.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 std::string port_str = 120 std::string port_str =
121 command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort); 121 command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort);
122 if (base::StringToInt(port_str, &temp_port) && 122 if (base::StringToInt(port_str, &temp_port) &&
123 temp_port > 0 && temp_port < 65535) { 123 temp_port > 0 && temp_port < 65535) {
124 port = temp_port; 124 port = temp_port;
125 } else { 125 } else {
126 DLOG(WARNING) << "Invalid http debugger port number " << temp_port; 126 DLOG(WARNING) << "Invalid http debugger port number " << temp_port;
127 } 127 }
128 } 128 }
129 #endif 129 #endif
130 devtools_delegate_ = new ShellDevToolsDelegate(port); 130 devtools_delegate_ = new ShellDevToolsDelegate(browser_context_.get(), port);
131 131
132 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { 132 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
133 Shell::CreateNewWindow(browser_context_.get(), 133 Shell::CreateNewWindow(browser_context_.get(),
134 GetStartupURL(), 134 GetStartupURL(),
135 NULL, 135 NULL,
136 MSG_ROUTING_NONE, 136 MSG_ROUTING_NONE,
137 NULL); 137 NULL);
138 } 138 }
139 139
140 if (parameters_.ui_task) { 140 if (parameters_.ui_task) {
(...skipping 11 matching lines...) Expand all
152 #if defined(USE_AURA) 152 #if defined(USE_AURA)
153 Shell::PlatformExit(); 153 Shell::PlatformExit();
154 #endif 154 #endif
155 if (devtools_delegate_) 155 if (devtools_delegate_)
156 devtools_delegate_->Stop(); 156 devtools_delegate_->Stop();
157 browser_context_.reset(); 157 browser_context_.reset();
158 off_the_record_browser_context_.reset(); 158 off_the_record_browser_context_.reset();
159 } 159 }
160 160
161 } // namespace 161 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698