OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/devtools/remote_debugging_server.h" | 5 #include "chromecast/browser/devtools/remote_debugging_server.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 #endif | 87 #endif |
88 } | 88 } |
89 | 89 |
90 std::string GetFrontendUrl() { | 90 std::string GetFrontendUrl() { |
91 return base::StringPrintf(kFrontEndURL, content::GetWebKitRevision().c_str()); | 91 return base::StringPrintf(kFrontEndURL, content::GetWebKitRevision().c_str()); |
92 } | 92 } |
93 | 93 |
94 } // namespace | 94 } // namespace |
95 | 95 |
96 RemoteDebuggingServer::RemoteDebuggingServer() | 96 RemoteDebuggingServer::RemoteDebuggingServer() |
97 : devtools_http_handler_(NULL), | 97 : devtools_http_handler_(), |
lcwu1
2014/11/14 23:26:59
Why don't you simply remove this member from the i
gunsch
2014/11/14 23:36:44
Done.
| |
98 port_(0) { | 98 port_(0) { |
99 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 99 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
100 pref_port_.Init(prefs::kRemoteDebuggingPort, | 100 pref_port_.Init(prefs::kRemoteDebuggingPort, |
101 ChromecastConfig::GetInstance()->pref_service(), | 101 ChromecastConfig::GetInstance()->pref_service(), |
102 base::Bind(&RemoteDebuggingServer::OnPortChanged, | 102 base::Bind(&RemoteDebuggingServer::OnPortChanged, |
103 base::Unretained(this))); | 103 base::Unretained(this))); |
104 | 104 |
105 // Starts new dev tools, clearing port number saved in config. | 105 // Starts new dev tools, clearing port number saved in config. |
106 // Remote debugging in production must be triggered only by config server. | 106 // Remote debugging in production must be triggered only by config server. |
107 pref_port_.SetValue(ShouldStartImmediately() ? | 107 pref_port_.SetValue(ShouldStartImmediately() ? |
(...skipping 30 matching lines...) Expand all Loading... | |
138 CreateSocketFactory(port_), | 138 CreateSocketFactory(port_), |
139 GetFrontendUrl(), | 139 GetFrontendUrl(), |
140 new CastDevToolsDelegate(), | 140 new CastDevToolsDelegate(), |
141 base::FilePath())); | 141 base::FilePath())); |
142 LOG(INFO) << "Devtools started: port=" << port_; | 142 LOG(INFO) << "Devtools started: port=" << port_; |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 } // namespace shell | 146 } // namespace shell |
147 } // namespace chromecast | 147 } // namespace chromecast |
OLD | NEW |