OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 14 matching lines...) Expand all Loading... |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "web/WebViewImpl.h" | 32 #include "web/WebViewImpl.h" |
33 | 33 |
34 #include "core/CSSValueKeywords.h" | 34 #include "core/CSSValueKeywords.h" |
35 #include "core/HTMLNames.h" | |
36 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
37 #include "core/dom/DocumentMarkerController.h" | 36 #include "core/dom/DocumentMarkerController.h" |
38 #include "core/dom/NodeRenderingTraversal.h" | 37 #include "core/dom/NodeRenderingTraversal.h" |
39 #include "core/dom/Text.h" | 38 #include "core/dom/Text.h" |
40 #include "core/editing/Editor.h" | 39 #include "core/editing/Editor.h" |
41 #include "core/editing/FrameSelection.h" | 40 #include "core/editing/FrameSelection.h" |
42 #include "core/editing/HTMLInterchange.h" | 41 #include "core/editing/HTMLInterchange.h" |
43 #include "core/editing/InputMethodController.h" | 42 #include "core/editing/InputMethodController.h" |
| 43 #include "core/editing/markup.h" |
44 #include "core/editing/TextIterator.h" | 44 #include "core/editing/TextIterator.h" |
45 #include "core/editing/markup.h" | |
46 #include "core/events/KeyboardEvent.h" | 45 #include "core/events/KeyboardEvent.h" |
47 #include "core/events/WheelEvent.h" | 46 #include "core/events/WheelEvent.h" |
48 #include "core/frame/FrameHost.h" | 47 #include "core/frame/FrameHost.h" |
49 #include "core/frame/FrameView.h" | 48 #include "core/frame/FrameView.h" |
50 #include "core/frame/LocalFrame.h" | 49 #include "core/frame/LocalFrame.h" |
51 #include "core/frame/Settings.h" | 50 #include "core/frame/Settings.h" |
52 #include "core/html/HTMLImportElement.h" | 51 #include "core/html/HTMLImportElement.h" |
53 #include "core/html/ime/InputMethodContext.h" | 52 #include "core/html/ime/InputMethodContext.h" |
| 53 #include "core/HTMLNames.h" |
| 54 #include "core/inspector/inspector_backend_mojo.h" |
54 #include "core/loader/FrameLoader.h" | 55 #include "core/loader/FrameLoader.h" |
55 #include "core/loader/UniqueIdentifier.h" | 56 #include "core/loader/UniqueIdentifier.h" |
56 #include "core/page/Chrome.h" | 57 #include "core/page/Chrome.h" |
57 #include "core/page/EventHandler.h" | 58 #include "core/page/EventHandler.h" |
58 #include "core/page/EventWithHitTestResults.h" | 59 #include "core/page/EventWithHitTestResults.h" |
59 #include "core/page/FocusController.h" | 60 #include "core/page/FocusController.h" |
60 #include "core/page/Page.h" | 61 #include "core/page/Page.h" |
61 #include "core/page/TouchDisambiguation.h" | 62 #include "core/page/TouchDisambiguation.h" |
| 63 #include "core/rendering/compositing/RenderLayerCompositor.h" |
62 #include "core/rendering/RenderView.h" | 64 #include "core/rendering/RenderView.h" |
63 #include "core/rendering/compositing/RenderLayerCompositor.h" | |
64 #include "platform/Cursor.h" | 65 #include "platform/Cursor.h" |
| 66 #include "platform/exported/WebActiveGestureAnimation.h" |
| 67 #include "platform/fonts/FontCache.h" |
| 68 #include "platform/graphics/Color.h" |
| 69 #include "platform/graphics/Image.h" |
| 70 #include "platform/graphics/ImageBuffer.h" |
65 #include "platform/KeyboardCodes.h" | 71 #include "platform/KeyboardCodes.h" |
66 #include "platform/Logging.h" | 72 #include "platform/Logging.h" |
67 #include "platform/NotImplemented.h" | 73 #include "platform/NotImplemented.h" |
68 #include "platform/PlatformGestureEvent.h" | 74 #include "platform/PlatformGestureEvent.h" |
69 #include "platform/PlatformKeyboardEvent.h" | 75 #include "platform/PlatformKeyboardEvent.h" |
70 #include "platform/PlatformMouseEvent.h" | 76 #include "platform/PlatformMouseEvent.h" |
71 #include "platform/PlatformWheelEvent.h" | 77 #include "platform/PlatformWheelEvent.h" |
72 #include "platform/RuntimeEnabledFeatures.h" | 78 #include "platform/RuntimeEnabledFeatures.h" |
| 79 #include "platform/scroll/Scrollbar.h" |
73 #include "platform/TraceEvent.h" | 80 #include "platform/TraceEvent.h" |
74 #include "platform/UserGestureIndicator.h" | 81 #include "platform/UserGestureIndicator.h" |
75 #include "platform/exported/WebActiveGestureAnimation.h" | |
76 #include "platform/fonts/FontCache.h" | |
77 #include "platform/graphics/Color.h" | |
78 #include "platform/graphics/Image.h" | |
79 #include "platform/graphics/ImageBuffer.h" | |
80 #include "platform/scroll/Scrollbar.h" | |
81 #include "platform/weborigin/SchemeRegistry.h" | 82 #include "platform/weborigin/SchemeRegistry.h" |
82 #include "public/platform/Platform.h" | 83 #include "public/platform/Platform.h" |
83 #include "public/platform/WebFloatPoint.h" | 84 #include "public/platform/WebFloatPoint.h" |
84 #include "public/platform/WebGestureCurve.h" | 85 #include "public/platform/WebGestureCurve.h" |
85 #include "public/platform/WebImage.h" | 86 #include "public/platform/WebImage.h" |
86 #include "public/platform/WebLayerTreeView.h" | 87 #include "public/platform/WebLayerTreeView.h" |
87 #include "public/platform/WebURLRequest.h" | 88 #include "public/platform/WebURLRequest.h" |
88 #include "public/platform/WebVector.h" | 89 #include "public/platform/WebVector.h" |
89 #include "public/web/WebActiveWheelFlingParameters.h" | 90 #include "public/web/WebActiveWheelFlingParameters.h" |
90 #include "public/web/WebBeginFrameArgs.h" | 91 #include "public/web/WebBeginFrameArgs.h" |
91 #include "public/web/WebFrameClient.h" | 92 #include "public/web/WebFrameClient.h" |
92 #include "public/web/WebHitTestResult.h" | 93 #include "public/web/WebHitTestResult.h" |
93 #include "public/web/WebNode.h" | 94 #include "public/web/WebNode.h" |
94 #include "public/web/WebRange.h" | 95 #include "public/web/WebRange.h" |
95 #include "public/web/WebTextInputInfo.h" | 96 #include "public/web/WebTextInputInfo.h" |
96 #include "public/web/WebViewClient.h" | 97 #include "public/web/WebViewClient.h" |
97 #include "web/CompositionUnderlineVectorBuilder.h" | 98 #include "web/CompositionUnderlineVectorBuilder.h" |
98 #include "web/GraphicsLayerFactoryChromium.h" | 99 #include "web/GraphicsLayerFactoryChromium.h" |
99 #include "web/LinkHighlight.h" | 100 #include "web/LinkHighlight.h" |
| 101 #include "web/painting/ContinuousPainter.h" |
100 #include "web/WebInputEventConversion.h" | 102 #include "web/WebInputEventConversion.h" |
101 #include "web/WebLocalFrameImpl.h" | 103 #include "web/WebLocalFrameImpl.h" |
102 #include "web/WebSettingsImpl.h" | 104 #include "web/WebSettingsImpl.h" |
103 #include "web/painting/ContinuousPainter.h" | |
104 #include "wtf/CurrentTime.h" | 105 #include "wtf/CurrentTime.h" |
105 #include "wtf/RefPtr.h" | 106 #include "wtf/RefPtr.h" |
106 #include "wtf/TemporaryChange.h" | 107 #include "wtf/TemporaryChange.h" |
107 | 108 |
108 // Get rid of WTF's pow define so we can use std::pow. | 109 // Get rid of WTF's pow define so we can use std::pow. |
109 #undef pow | 110 #undef pow |
110 #include <cmath> // for std::pow | 111 #include <cmath> // for std::pow |
111 | 112 |
112 namespace blink { | 113 namespace blink { |
113 | 114 |
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1598 void WebViewImpl::injectModule(const WebString& path) | 1599 void WebViewImpl::injectModule(const WebString& path) |
1599 { | 1600 { |
1600 RefPtr<Document> document = m_page->mainFrame()->document(); | 1601 RefPtr<Document> document = m_page->mainFrame()->document(); |
1601 RefPtr<HTMLImportElement> import = HTMLImportElement::create(*document); | 1602 RefPtr<HTMLImportElement> import = HTMLImportElement::create(*document); |
1602 import->setAttribute(HTMLNames::srcAttr, path); | 1603 import->setAttribute(HTMLNames::srcAttr, path); |
1603 if (!document->documentElement()) | 1604 if (!document->documentElement()) |
1604 return; | 1605 return; |
1605 document->documentElement()->appendChild(import.release()); | 1606 document->documentElement()->appendChild(import.release()); |
1606 } | 1607 } |
1607 | 1608 |
| 1609 void WebViewImpl::connectInspectorBackend() |
| 1610 { |
| 1611 m_inspectorBackend = adoptPtr(new InspectorBackendMojo(page()->frameHost()))
; |
| 1612 m_inspectorBackend->Connect(); |
| 1613 } |
| 1614 |
1608 void WebViewImpl::setFocusedFrame(WebFrame* frame) | 1615 void WebViewImpl::setFocusedFrame(WebFrame* frame) |
1609 { | 1616 { |
1610 if (!frame) { | 1617 if (!frame) { |
1611 // Clears the focused frame if any. | 1618 // Clears the focused frame if any. |
1612 LocalFrame* focusedFrame = focusedCoreFrame(); | 1619 LocalFrame* focusedFrame = focusedCoreFrame(); |
1613 if (focusedFrame) | 1620 if (focusedFrame) |
1614 focusedFrame->selection().setFocused(false); | 1621 focusedFrame->selection().setFocused(false); |
1615 return; | 1622 return; |
1616 } | 1623 } |
1617 LocalFrame* coreFrame = toWebLocalFrameImpl(frame)->frame(); | 1624 LocalFrame* coreFrame = toWebLocalFrameImpl(frame)->frame(); |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2252 m_layerTreeView->setVisible(visible); | 2259 m_layerTreeView->setVisible(visible); |
2253 } | 2260 } |
2254 } | 2261 } |
2255 | 2262 |
2256 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 2263 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
2257 { | 2264 { |
2258 return true; | 2265 return true; |
2259 } | 2266 } |
2260 | 2267 |
2261 } // namespace blink | 2268 } // namespace blink |
OLD | NEW |