OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 4 * |
4 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
6 * are met: | 7 * are met: |
7 * | 8 * |
8 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 11 * 2. Redistributions in binary form must reproduce the above copyright |
11 * notice, this list of conditions and the following disclaimer in the | 12 * notice, this list of conditions and the following disclaimer in the |
12 * documentation and/or other materials provided with the distribution. | 13 * documentation and/or other materials provided with the distribution. |
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of | 14 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
14 * its contributors may be used to endorse or promote products derived | 15 * its contributors may be used to endorse or promote products derived |
15 * from this software without specific prior written permission. | 16 * from this software without specific prior written permission. |
16 * | 17 * |
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 18 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 21 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 28 */ |
28 | 29 |
29 #ifndef AXListBoxOption_h | 30 #ifndef DartScriptDebugListener_h |
30 #define AXListBoxOption_h | 31 #define DartScriptDebugListener_h |
31 | 32 |
32 #include "core/html/HTMLElement.h" | 33 |
33 #include "modules/accessibility/AXLayoutObject.h" | 34 #include "bindings/common/ScriptState.h" |
| 35 #include "core/inspector/ScriptDebugListener.h" |
| 36 |
34 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
| 38 #include "wtf/Vector.h" |
| 39 #include "wtf/text/WTFString.h" |
| 40 #include <dart_tools_api.h> |
35 | 41 |
36 namespace blink { | 42 namespace blink { |
37 | 43 |
38 class AXObjectCacheImpl; | 44 class ExecutionContext; |
39 class HTMLSelectElement; | 45 class ScriptValue; |
40 | 46 |
41 class AXListBoxOption final : public AXLayoutObject { | 47 class DartScriptDebugListener { |
| 48 public: |
| 49 class Script { |
| 50 public: |
| 51 Script() |
| 52 : startLine(0) |
| 53 , startColumn(0) |
| 54 , endLine(0) |
| 55 , endColumn(0) |
| 56 , isContentScript(false) |
| 57 , libraryId(-1) |
| 58 { |
| 59 } |
42 | 60 |
43 private: | 61 String url; |
44 AXListBoxOption(LayoutObject*, AXObjectCacheImpl&); | 62 String sourceURL; |
| 63 String sourceMappingURL; |
| 64 String source; |
| 65 int startLine; |
| 66 int startColumn; |
| 67 int endLine; |
| 68 int endColumn; |
| 69 bool isContentScript; |
| 70 String language; |
| 71 int libraryId; |
| 72 }; |
45 | 73 |
46 public: | 74 enum SkipPauseRequest { |
47 static PassRefPtrWillBeRawPtr<AXListBoxOption> create(LayoutObject*, AXObjec
tCacheImpl&); | 75 NoSkip, |
48 ~AXListBoxOption() override; | 76 Continue, |
| 77 StepInto, |
| 78 StepOut |
| 79 }; |
49 | 80 |
50 bool isAXListBoxOption() const override { return true; } | 81 virtual ~DartScriptDebugListener() { } |
51 AccessibilityRole determineAccessibilityRole() final; | |
52 bool isSelected() const override; | |
53 bool isEnabled() const override; | |
54 bool isSelectedOptionActive() const override; | |
55 void setSelected(bool) override; | |
56 bool canSetSelectedAttribute() const override; | |
57 String stringValue() const override; | |
58 String deprecatedTitle(TextUnderElementMode) const override { return String(
); } | |
59 | 82 |
60 private: | 83 virtual void didParseSource(const String& scriptId, const Script&, CompileRe
sult) = 0; |
61 bool canHaveChildren() const override { return false; } | 84 virtual SkipPauseRequest didPause(ScriptState*, Dart_StackTrace callFrames,
const ScriptValue& exception, const Vector<String>& hitBreakpoints) = 0; |
62 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override
; | 85 virtual void didContinue() = 0; |
63 | |
64 HTMLSelectElement* listBoxOptionParentNode() const; | |
65 int listBoxOptionIndex() const; | |
66 AXObject* listBoxOptionAXObject(HTMLElement*) const; | |
67 bool isParentPresentationalRole() const; | |
68 }; | 86 }; |
69 | 87 |
70 DEFINE_AX_OBJECT_TYPE_CASTS(AXListBoxOption, isAXListBoxOption()); | |
71 | |
72 } // namespace blink | 88 } // namespace blink |
73 | 89 |
74 #endif // AXListBoxOption_h | 90 |
| 91 #endif // DartScriptDebugListener_h |
OLD | NEW |