| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 KURL result = url; | 89 KURL result = url; |
| 90 result.removeFragmentIdentifier(); | 90 result.removeFragmentIdentifier(); |
| 91 return result; | 91 return result; |
| 92 } | 92 } |
| 93 | 93 |
| 94 String frameId(LocalFrame* frame) | 94 String frameId(LocalFrame* frame) |
| 95 { | 95 { |
| 96 return frame ? InspectorIdentifiers<LocalFrame>::identifier(frame) : ""; | 96 return frame ? InspectorIdentifiers<LocalFrame>::identifier(frame) : ""; |
| 97 } | 97 } |
| 98 | 98 |
| 99 TypeBuilder::Page::DialogType::Enum dialogTypeToProtocol(ChromeClient::DialogTyp
e dialogType) |
| 100 { |
| 101 switch (dialogType) { |
| 102 case ChromeClient::AlertDialog: |
| 103 return TypeBuilder::Page::DialogType::Alert; |
| 104 case ChromeClient::ConfirmDialog: |
| 105 return TypeBuilder::Page::DialogType::Confirm; |
| 106 case ChromeClient::PromptDialog: |
| 107 return TypeBuilder::Page::DialogType::Prompt; |
| 108 case ChromeClient::HTMLDialog: |
| 109 return TypeBuilder::Page::DialogType::Beforeunload; |
| 110 } |
| 111 return TypeBuilder::Page::DialogType::Alert; |
| 112 } |
| 113 |
| 99 } | 114 } |
| 100 | 115 |
| 101 class InspectorPageAgent::GetResourceContentLoadListener final : public VoidCall
back { | 116 class InspectorPageAgent::GetResourceContentLoadListener final : public VoidCall
back { |
| 102 public: | 117 public: |
| 103 GetResourceContentLoadListener(InspectorPageAgent*, const String& frameId, c
onst String& url, PassRefPtrWillBeRawPtr<GetResourceContentCallback>); | 118 GetResourceContentLoadListener(InspectorPageAgent*, const String& frameId, c
onst String& url, PassRefPtrWillBeRawPtr<GetResourceContentCallback>); |
| 104 DECLARE_VIRTUAL_TRACE(); | 119 DECLARE_VIRTUAL_TRACE(); |
| 105 virtual void handleEvent() override; | 120 virtual void handleEvent() override; |
| 106 private: | 121 private: |
| 107 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; | 122 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| 108 String m_frameId; | 123 String m_frameId; |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 void InspectorPageAgent::frameScheduledNavigation(LocalFrame* frame, double dela
y) | 751 void InspectorPageAgent::frameScheduledNavigation(LocalFrame* frame, double dela
y) |
| 737 { | 752 { |
| 738 frontend()->frameScheduledNavigation(frameId(frame), delay); | 753 frontend()->frameScheduledNavigation(frameId(frame), delay); |
| 739 } | 754 } |
| 740 | 755 |
| 741 void InspectorPageAgent::frameClearedScheduledNavigation(LocalFrame* frame) | 756 void InspectorPageAgent::frameClearedScheduledNavigation(LocalFrame* frame) |
| 742 { | 757 { |
| 743 frontend()->frameClearedScheduledNavigation(frameId(frame)); | 758 frontend()->frameClearedScheduledNavigation(frameId(frame)); |
| 744 } | 759 } |
| 745 | 760 |
| 746 void InspectorPageAgent::willRunJavaScriptDialog(const String& message) | 761 void InspectorPageAgent::willRunJavaScriptDialog(const String& message, ChromeCl
ient::DialogType dialogType) |
| 747 { | 762 { |
| 748 frontend()->javascriptDialogOpening(message); | 763 frontend()->javascriptDialogOpening(message, dialogTypeToProtocol(dialogType
)); |
| 749 } | 764 } |
| 750 | 765 |
| 751 void InspectorPageAgent::didRunJavaScriptDialog() | 766 void InspectorPageAgent::didRunJavaScriptDialog(bool result) |
| 752 { | 767 { |
| 753 frontend()->javascriptDialogClosed(); | 768 frontend()->javascriptDialogClosed(result); |
| 754 } | 769 } |
| 755 | 770 |
| 756 void InspectorPageAgent::didLayout() | 771 void InspectorPageAgent::didLayout() |
| 757 { | 772 { |
| 758 if (!m_enabled) | 773 if (!m_enabled) |
| 759 return; | 774 return; |
| 760 m_overlay->update(); | 775 m_overlay->update(); |
| 761 } | 776 } |
| 762 | 777 |
| 763 void InspectorPageAgent::didScroll() | 778 void InspectorPageAgent::didScroll() |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 { | 888 { |
| 874 visitor->trace(m_inspectedFrame); | 889 visitor->trace(m_inspectedFrame); |
| 875 visitor->trace(m_debuggerAgent); | 890 visitor->trace(m_debuggerAgent); |
| 876 visitor->trace(m_cssAgent); | 891 visitor->trace(m_cssAgent); |
| 877 visitor->trace(m_overlay); | 892 visitor->trace(m_overlay); |
| 878 visitor->trace(m_inspectorResourceContentLoader); | 893 visitor->trace(m_inspectorResourceContentLoader); |
| 879 InspectorBaseAgent::trace(visitor); | 894 InspectorBaseAgent::trace(visitor); |
| 880 } | 895 } |
| 881 | 896 |
| 882 } // namespace blink | 897 } // namespace blink |
| OLD | NEW |