Changeset 196454 in webkit
- Timestamp:
- Feb 11, 2016 4:02:29 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r196446 r196454 1 2016-02-11 Brian Burg <bburg@apple.com> 2 3 Web Inspector: RemoteInspector's listings should include whether an AutomationTarget is paired 4 https://bugs.webkit.org/show_bug.cgi?id=154077 5 <rdar://problem/24589133> 6 7 Reviewed by Joseph Pecoraro. 8 9 Instead of not generating a listing for the target when it is occupied, 10 generate the listing with a 'paired' flag. The old flag was redundant 11 because a _WKAutomationDelegate will not create a session if it doesn't 12 support automation or it already has an active session. 13 14 * inspector/remote/RemoteAutomationTarget.cpp: 15 (Inspector::RemoteAutomationTarget::setIsPaired): 16 (Inspector::RemoteAutomationTarget::setAutomationAllowed): Deleted. 17 * inspector/remote/RemoteAutomationTarget.h: 18 Return false for remoteControlAllowed() if the target is already paired. 19 This function is used by RemoteInspector to deny incoming connections. 20 21 * inspector/remote/RemoteInspector.mm: 22 (Inspector::RemoteInspector::listingForAutomationTarget): 23 * inspector/remote/RemoteInspectorConstants.h: 24 1 25 2016-02-11 Filip Pizlo <fpizlo@apple.com> 2 26 -
trunk/Source/JavaScriptCore/inspector/remote/RemoteAutomationTarget.cpp
r192753 r196454 1 1 /* 2 * Copyright (C) 2015 Apple Inc. All rights reserved.2 * Copyright (C) 2015, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 namespace Inspector { 34 34 35 void RemoteAutomationTarget::set AutomationAllowed(bool allowed)35 void RemoteAutomationTarget::setIsPaired(bool paired) 36 36 { 37 if (m_ allowed == allowed)37 if (m_paired == paired) 38 38 return; 39 39 40 m_ allowed = allowed;40 m_paired = paired; 41 41 42 42 update(); -
trunk/Source/JavaScriptCore/inspector/remote/RemoteAutomationTarget.h
r192753 r196454 1 1 /* 2 * Copyright (C) 2015 Apple Inc. All rights reserved.2 * Copyright (C) 2015, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 40 40 virtual ~RemoteAutomationTarget() { } 41 41 42 bool automationAllowed() const { return m_allowed; }43 void set AutomationAllowed(bool);42 bool isPaired() const { return m_paired; } 43 void setIsPaired(bool); 44 44 45 45 virtual String name() const = 0; 46 46 virtual RemoteControllableTarget::Type type() const override { return RemoteControllableTarget::Type::Automation; } 47 virtual bool remoteControlAllowed() const override { return automationAllowed(); };47 virtual bool remoteControlAllowed() const override { return !m_paired; }; 48 48 49 49 private: 50 bool m_ allowed { false };50 bool m_paired { false }; 51 51 }; 52 52 -
trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm
r194646 r196454 526 526 ASSERT(isMainThread()); 527 527 528 if (!target.automationAllowed())529 return nil;530 531 528 RetainPtr<NSMutableDictionary> listing = adoptNS([[NSMutableDictionary alloc] init]); 532 529 [listing setObject:@(target.identifier()) forKey:WIRPageIdentifierKey]; 533 530 [listing setObject:target.name() forKey:WIRTitleKey]; 534 531 [listing setObject:WIRTypeAutomation forKey:WIRTypeKey]; 532 [listing setObject:@(target.isPaired()) forKey:WIRAutomationTargetIsPairedKey]; 535 533 536 534 if (auto connection = m_connectionMap.get(target.identifier())) -
trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h
r194646 r196454 83 83 #define WIRAutomaticInspectionCandidateMessage @"WIRAutomaticInspectionCandidateMessage" 84 84 85 #define WIRAutomationTargetIsPairedKey @"WIRAutomationTargetIsPairedKey" 86 85 87 // These definitions are shared with a Simulator webinspectord and 86 88 // OS X process communicating with it.
Note: See TracChangeset
for help on using the changeset viewer.