| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 void setTextDirection(WebTextDirection) override; | 116 void setTextDirection(WebTextDirection) override; |
| 117 bool isAcceleratedCompositingActive() const override; | 117 bool isAcceleratedCompositingActive() const override; |
| 118 void willCloseLayerTreeView() override; | 118 void willCloseLayerTreeView() override; |
| 119 void didAcquirePointerLock() override; | 119 void didAcquirePointerLock() override; |
| 120 void didNotAcquirePointerLock() override; | 120 void didNotAcquirePointerLock() override; |
| 121 void didLosePointerLock() override; | 121 void didLosePointerLock() override; |
| 122 bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) override; | 122 bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) override; |
| 123 void applyReplacementRange(const WebRange&) override; | 123 void applyReplacementRange(const WebRange&) override; |
| 124 | 124 |
| 125 // WebFrameWidget implementation. | 125 // WebFrameWidget implementation. |
| 126 WebLocalFrameImpl* localRoot() override { return m_localRoot; } | 126 WebLocalFrameImpl* localRoot() const override { return m_localRoot; } |
| 127 void setVisibilityState(WebPageVisibilityState) override; | 127 void setVisibilityState(WebPageVisibilityState) override; |
| 128 bool isTransparent() const override; | 128 bool isTransparent() const override; |
| 129 void setIsTransparent(bool) override; | 129 void setIsTransparent(bool) override; |
| 130 void setBaseBackgroundColor(WebColor) override; | 130 void setBaseBackgroundColor(WebColor) override; |
| 131 | 131 |
| 132 Frame* focusedCoreFrame() const; | 132 Frame* focusedCoreFrame() const; |
| 133 | 133 |
| 134 // Returns the currently focused Element or null if no element has focus. | 134 // Returns the currently focused Element or null if no element has focus. |
| 135 Element* focusedElement() const; | 135 Element* focusedElement() const; |
| 136 | 136 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 147 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; | 147 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; |
| 148 HitTestResult coreHitTestResultAt(const WebPoint&) override; | 148 HitTestResult coreHitTestResultAt(const WebPoint&) override; |
| 149 | 149 |
| 150 // Exposed for the purpose of overriding device metrics. | 150 // Exposed for the purpose of overriding device metrics. |
| 151 void sendResizeEventAndRepaint(); | 151 void sendResizeEventAndRepaint(); |
| 152 | 152 |
| 153 void updateMainFrameLayoutSize(); | 153 void updateMainFrameLayoutSize(); |
| 154 | 154 |
| 155 void setIgnoreInputEvents(bool newValue); | 155 void setIgnoreInputEvents(bool newValue); |
| 156 | 156 |
| 157 // Returns the page object associated with this widget. This may be null when | |
| 158 // the page is shutting down, but will be valid at all other times. | |
| 159 Page* page() const { return view()->page(); } | |
| 160 | |
| 161 // Event related methods: | 157 // Event related methods: |
| 162 void mouseContextMenu(const WebMouseEvent&); | 158 void mouseContextMenu(const WebMouseEvent&); |
| 163 | 159 |
| 164 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } | 160 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
| 165 GraphicsLayer* rootGraphicsLayer() const { return m_rootGraphicsLayer; }; | 161 GraphicsLayer* rootGraphicsLayer() const { return m_rootGraphicsLayer; }; |
| 166 | 162 |
| 167 Color baseBackgroundColor() const { return m_baseBackgroundColor; } | 163 Color baseBackgroundColor() const { return m_baseBackgroundColor; } |
| 168 | 164 |
| 169 DECLARE_TRACE(); | 165 DECLARE_TRACE(); |
| 170 | 166 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 186 // PageWidgetEventHandler functions | 182 // PageWidgetEventHandler functions |
| 187 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override; | 183 void handleMouseLeave(LocalFrame&, const WebMouseEvent&) override; |
| 188 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override; | 184 void handleMouseDown(LocalFrame&, const WebMouseEvent&) override; |
| 189 void handleMouseUp(LocalFrame&, const WebMouseEvent&) override; | 185 void handleMouseUp(LocalFrame&, const WebMouseEvent&) override; |
| 190 WebInputEventResult handleMouseWheel(LocalFrame&, | 186 WebInputEventResult handleMouseWheel(LocalFrame&, |
| 191 const WebMouseWheelEvent&) override; | 187 const WebMouseWheelEvent&) override; |
| 192 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override; | 188 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override; |
| 193 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override; | 189 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override; |
| 194 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override; | 190 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override; |
| 195 | 191 |
| 196 WebViewImpl* view() const { return m_localRoot->viewImpl(); } | |
| 197 InspectorOverlay* inspectorOverlay(); | 192 InspectorOverlay* inspectorOverlay(); |
| 198 | 193 |
| 199 // This method returns the focused frame belonging to this WebWidget, that | 194 // This method returns the focused frame belonging to this WebWidget, that |
| 200 // is, a focused frame with the same local root as the one corresponding | 195 // is, a focused frame with the same local root as the one corresponding |
| 201 // to this widget. It will return nullptr if no frame is focused or, the | 196 // to this widget. It will return nullptr if no frame is focused or, the |
| 202 // focused frame has a different local root. | 197 // focused frame has a different local root. |
| 203 LocalFrame* focusedLocalFrameInWidget() const; | 198 LocalFrame* focusedLocalFrameInWidget() const; |
| 204 | 199 |
| 205 WebPlugin* focusedPluginIfInputMethodSupported(LocalFrame*) const; | 200 WebPlugin* focusedPluginIfInputMethodSupported(LocalFrame*) const; |
| 206 | 201 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 244 |
| 250 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, | 245 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, |
| 251 WebFrameWidgetBase, | 246 WebFrameWidgetBase, |
| 252 widget, | 247 widget, |
| 253 widget->forSubframe(), | 248 widget->forSubframe(), |
| 254 widget.forSubframe()); | 249 widget.forSubframe()); |
| 255 | 250 |
| 256 } // namespace blink | 251 } // namespace blink |
| 257 | 252 |
| 258 #endif | 253 #endif |
| OLD | NEW |