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

Side by Side Diff: chrome/browser/ui/webui/devtools_ui.cc

Issue 596253003: DevTools: RemoteDevice and RemoteBrowser are now value types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pfc3
Patch Set: Rebased Created 6 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
« no previous file with comments | « chrome/browser/devtools/devtools_targets_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 bool OpenRemotePageRequest::OpenInBrowser( 316 bool OpenRemotePageRequest::OpenInBrowser(
317 DevToolsAndroidBridge::RemoteBrowser* browser) { 317 DevToolsAndroidBridge::RemoteBrowser* browser) {
318 if (!browser->IsChrome()) 318 if (!browser->IsChrome())
319 return false; 319 return false;
320 #if defined(DEBUG_DEVTOOLS) 320 #if defined(DEBUG_DEVTOOLS)
321 if (browser->serial() == kLocalSerial) 321 if (browser->serial() == kLocalSerial)
322 return false; 322 return false;
323 #endif // defined(DEBUG_DEVTOOLS) 323 #endif // defined(DEBUG_DEVTOOLS)
324 browser->Open(url_, base::Bind(&OpenRemotePageRequest::RemotePageOpened, 324 android_bridge_->OpenRemotePage(
325 base::Unretained(this))); 325 browser,
326 url_,
327 base::Bind(&OpenRemotePageRequest::RemotePageOpened,
328 base::Unretained(this)));
326 return true; 329 return true;
327 } 330 }
328 331
329 void OpenRemotePageRequest::RemotePageOpened( 332 void OpenRemotePageRequest::RemotePageOpened(
330 DevToolsAndroidBridge::RemotePage* page) { 333 DevToolsAndroidBridge::RemotePage* page) {
331 callback_.Run(page); 334 callback_.Run(page);
332 android_bridge_->RemoveDeviceListListener(this); 335 android_bridge_->RemoveDeviceListListener(this);
333 delete this; 336 delete this;
334 } 337 }
335 338
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 content::NavigationController& navigation_controller = 409 content::NavigationController& navigation_controller =
407 web_ui()->GetWebContents()->GetController(); 410 web_ui()->GetWebContents()->GetController();
408 content::NavigationController::LoadURLParams params(url); 411 content::NavigationController::LoadURLParams params(url);
409 params.should_replace_current_entry = true; 412 params.should_replace_current_entry = true;
410 remote_frontend_loading_url_ = virtual_url; 413 remote_frontend_loading_url_ = virtual_url;
411 navigation_controller.LoadURLWithParams(params); 414 navigation_controller.LoadURLWithParams(params);
412 navigation_controller.GetPendingEntry()->SetVirtualURL(virtual_url); 415 navigation_controller.GetPendingEntry()->SetVirtualURL(virtual_url);
413 416
414 bindings_.AttachTo(page->GetTarget()->GetAgentHost()); 417 bindings_.AttachTo(page->GetTarget()->GetAgentHost());
415 } 418 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_targets_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698