| 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/ui/webui/devtools_ui.h" | 5 #include "chrome/browser/ui/webui/devtools_ui.h" | 
| 6 | 6 | 
| 7 #include <string> | 7 #include <string> | 
| 8 | 8 | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" | 
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 243   callback.Run(bytes.get()); | 243   callback.Run(bytes.get()); | 
| 244 } | 244 } | 
| 245 | 245 | 
| 246 void DevToolsDataSource::StartRemoteDataRequest( | 246 void DevToolsDataSource::StartRemoteDataRequest( | 
| 247     const std::string& path, | 247     const std::string& path, | 
| 248     int render_process_id, | 248     int render_process_id, | 
| 249     int render_frame_id, | 249     int render_frame_id, | 
| 250     const content::URLDataSource::GotDataCallback& callback) { | 250     const content::URLDataSource::GotDataCallback& callback) { | 
| 251   GURL url = GURL(kRemoteFrontendBase + path); | 251   GURL url = GURL(kRemoteFrontendBase + path); | 
| 252   CHECK_EQ(url.host(), kRemoteFrontendDomain); | 252   CHECK_EQ(url.host(), kRemoteFrontendDomain); | 
| 253   new FetchRequest(request_context_, url, callback); | 253   new FetchRequest(request_context_.get(), url, callback); | 
| 254 } | 254 } | 
| 255 | 255 | 
| 256 // OpenRemotePageRequest ------------------------------------------------------ | 256 // OpenRemotePageRequest ------------------------------------------------------ | 
| 257 | 257 | 
| 258 class OpenRemotePageRequest : public DevToolsAndroidBridge::DeviceListListener { | 258 class OpenRemotePageRequest : public DevToolsAndroidBridge::DeviceListListener { | 
| 259  public: | 259  public: | 
| 260   OpenRemotePageRequest( | 260   OpenRemotePageRequest( | 
| 261       Profile* profile, | 261       Profile* profile, | 
| 262       const std::string url, | 262       const std::string url, | 
| 263       const DevToolsAndroidBridge::RemotePageCallback& callback); | 263       const DevToolsAndroidBridge::RemotePageCallback& callback); | 
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 406   content::NavigationController& navigation_controller = | 406   content::NavigationController& navigation_controller = | 
| 407       web_ui()->GetWebContents()->GetController(); | 407       web_ui()->GetWebContents()->GetController(); | 
| 408   content::NavigationController::LoadURLParams params(url); | 408   content::NavigationController::LoadURLParams params(url); | 
| 409   params.should_replace_current_entry = true; | 409   params.should_replace_current_entry = true; | 
| 410   remote_frontend_loading_url_ = virtual_url; | 410   remote_frontend_loading_url_ = virtual_url; | 
| 411   navigation_controller.LoadURLWithParams(params); | 411   navigation_controller.LoadURLWithParams(params); | 
| 412   navigation_controller.GetPendingEntry()->SetVirtualURL(virtual_url); | 412   navigation_controller.GetPendingEntry()->SetVirtualURL(virtual_url); | 
| 413 | 413 | 
| 414   bindings_.AttachTo(page->GetTarget()->GetAgentHost()); | 414   bindings_.AttachTo(page->GetTarget()->GetAgentHost()); | 
| 415 } | 415 } | 
| OLD | NEW | 
|---|