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

Side by Side Diff: chrome/browser/devtools/device/devtools_android_bridge.cc

Issue 2230993004: [DevTools] Recognize node remote target type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments were addressed Created 4 years, 4 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 | « no previous file | chrome/browser/devtools/devtools_target_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/devtools/device/devtools_android_bridge.h" 5 #include "chrome/browser/devtools/device/devtools_android_bridge.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 } 520 }
521 521
522 bool DevToolsAndroidBridge::RemotePageTarget::IsAttached() const { 522 bool DevToolsAndroidBridge::RemotePageTarget::IsAttached() const {
523 return target_path_.empty(); 523 return target_path_.empty();
524 } 524 }
525 525
526 static void NoOp(int, const std::string&) {} 526 static void NoOp(int, const std::string&) {}
527 527
528 void DevToolsAndroidBridge::RemotePageTarget::Inspect(Profile* profile) const { 528 void DevToolsAndroidBridge::RemotePageTarget::Inspect(Profile* profile) const {
529 Activate(); 529 Activate();
530 bool isWorker = remote_type_ == kTargetTypeWorker || 530 bool is_worker = remote_type_ == kTargetTypeWorker ||
531 remote_type_ == kTargetTypeServiceWorker; 531 remote_type_ == kTargetTypeServiceWorker;
532 bool is_v8_only = remote_type_ == kTargetTypeNode;
532 DevToolsWindow::OpenExternalFrontend(profile, frontend_url_, GetAgentHost(), 533 DevToolsWindow::OpenExternalFrontend(profile, frontend_url_, GetAgentHost(),
533 isWorker); 534 is_worker, is_v8_only);
534 } 535 }
535 536
536 bool DevToolsAndroidBridge::RemotePageTarget::Activate() const { 537 bool DevToolsAndroidBridge::RemotePageTarget::Activate() const {
537 if (!bridge_) 538 if (!bridge_)
538 return false; 539 return false;
539 540
540 std::string request = base::StringPrintf(kActivatePageRequest, 541 std::string request = base::StringPrintf(kActivatePageRequest,
541 remote_id_.c_str()); 542 remote_id_.c_str());
542 bridge_->SendJsonRequest(browser_id_, request, base::Bind(&NoOp)); 543 bridge_->SendJsonRequest(browser_id_, request, base::Bind(&NoOp));
543 return true; 544 return true;
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 if (pref_value->GetAsBoolean(&enabled) && enabled) { 946 if (pref_value->GetAsBoolean(&enabled) && enabled) {
946 device_providers.push_back(new UsbDeviceProvider(profile_)); 947 device_providers.push_back(new UsbDeviceProvider(profile_));
947 } 948 }
948 949
949 device_manager_->SetDeviceProviders(device_providers); 950 device_manager_->SetDeviceProviders(device_providers);
950 if (NeedsDeviceListPolling()) { 951 if (NeedsDeviceListPolling()) {
951 StopDeviceListPolling(); 952 StopDeviceListPolling();
952 StartDeviceListPolling(); 953 StartDeviceListPolling();
953 } 954 }
954 } 955 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_target_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698