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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 using WebFrameWidgetsSet = | 65 using WebFrameWidgetsSet = |
66 PersistentHeapHashSet<WeakMember<WebFrameWidgetImpl>>; | 66 PersistentHeapHashSet<WeakMember<WebFrameWidgetImpl>>; |
67 | 67 |
68 class WebFrameWidgetImpl final | 68 class WebFrameWidgetImpl final |
69 : public GarbageCollectedFinalized<WebFrameWidgetImpl>, | 69 : public GarbageCollectedFinalized<WebFrameWidgetImpl>, |
70 public WebFrameWidgetBase, | 70 public WebFrameWidgetBase, |
71 public PageWidgetEventHandler { | 71 public PageWidgetEventHandler { |
72 public: | 72 public: |
73 static WebFrameWidgetImpl* create(WebWidgetClient*, WebLocalFrame*); | 73 static WebFrameWidgetImpl* create(WebWidgetClient*, WebLocalFrame*); |
74 static WebFrameWidgetsSet& allInstances(); | |
75 | 74 |
76 ~WebFrameWidgetImpl(); | 75 ~WebFrameWidgetImpl(); |
77 | 76 |
78 // WebWidget functions: | 77 // WebWidget functions: |
79 void close() override; | 78 void close() override; |
80 WebSize size() override; | 79 WebSize size() override; |
81 void resize(const WebSize&) override; | 80 void resize(const WebSize&) override; |
82 void resizeVisualViewport(const WebSize&) override; | 81 void resizeVisualViewport(const WebSize&) override; |
83 void didEnterFullscreen() override; | 82 void didEnterFullscreen() override; |
84 void didExitFullscreen() override; | 83 void didExitFullscreen() override; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 void setRootLayer(WebLayer*) override; | 142 void setRootLayer(WebLayer*) override; |
144 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; | 143 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; |
145 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; | 144 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*) override; |
146 HitTestResult coreHitTestResultAt(const WebPoint&) override; | 145 HitTestResult coreHitTestResultAt(const WebPoint&) override; |
147 | 146 |
148 // Exposed for the purpose of overriding device metrics. | 147 // Exposed for the purpose of overriding device metrics. |
149 void sendResizeEventAndRepaint(); | 148 void sendResizeEventAndRepaint(); |
150 | 149 |
151 void updateMainFrameLayoutSize(); | 150 void updateMainFrameLayoutSize(); |
152 | 151 |
153 void setIgnoreInputEvents(bool newValue); | |
154 | |
155 // Event related methods: | 152 // Event related methods: |
156 void mouseContextMenu(const WebMouseEvent&); | 153 void mouseContextMenu(const WebMouseEvent&); |
157 | 154 |
158 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } | 155 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
159 GraphicsLayer* rootGraphicsLayer() const { return m_rootGraphicsLayer; }; | 156 GraphicsLayer* rootGraphicsLayer() const { return m_rootGraphicsLayer; }; |
160 | 157 |
161 Color baseBackgroundColor() const { return m_baseBackgroundColor; } | 158 Color baseBackgroundColor() const { return m_baseBackgroundColor; } |
162 | 159 |
163 DECLARE_TRACE(); | 160 DECLARE_TRACE(); |
164 | 161 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 216 |
220 WebLayerTreeView* m_layerTreeView; | 217 WebLayerTreeView* m_layerTreeView; |
221 WebLayer* m_rootLayer; | 218 WebLayer* m_rootLayer; |
222 GraphicsLayer* m_rootGraphicsLayer; | 219 GraphicsLayer* m_rootGraphicsLayer; |
223 std::unique_ptr<CompositorAnimationHost> m_compositorAnimationHost; | 220 std::unique_ptr<CompositorAnimationHost> m_compositorAnimationHost; |
224 bool m_isAcceleratedCompositingActive; | 221 bool m_isAcceleratedCompositingActive; |
225 bool m_layerTreeViewClosed; | 222 bool m_layerTreeViewClosed; |
226 | 223 |
227 bool m_suppressNextKeypressEvent; | 224 bool m_suppressNextKeypressEvent; |
228 | 225 |
229 bool m_ignoreInputEvents; | |
230 | |
231 // Whether the WebFrameWidget is rendering transparently. | 226 // Whether the WebFrameWidget is rendering transparently. |
232 bool m_isTransparent; | 227 bool m_isTransparent; |
233 | 228 |
234 // Represents whether or not this object should process incoming IME events. | 229 // Represents whether or not this object should process incoming IME events. |
235 bool m_imeAcceptEvents; | 230 bool m_imeAcceptEvents; |
236 | 231 |
237 static const WebInputEvent* m_currentInputEvent; | 232 static const WebInputEvent* m_currentInputEvent; |
238 | 233 |
239 WebColor m_baseBackgroundColor; | 234 WebColor m_baseBackgroundColor; |
240 | 235 |
241 SelfKeepAlive<WebFrameWidgetImpl> m_selfKeepAlive; | 236 SelfKeepAlive<WebFrameWidgetImpl> m_selfKeepAlive; |
242 }; | 237 }; |
243 | 238 |
244 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, | 239 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, |
245 WebFrameWidgetBase, | 240 WebFrameWidgetBase, |
246 widget, | 241 widget, |
247 widget->forSubframe(), | 242 widget->forSubframe(), |
248 widget.forSubframe()); | 243 widget.forSubframe()); |
249 | 244 |
250 } // namespace blink | 245 } // namespace blink |
251 | 246 |
252 #endif | 247 #endif |
OLD | NEW |