OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "core/page/WindowFeatures.h" | 36 #include "core/page/WindowFeatures.h" |
37 #include "public/web/WebNavigationPolicy.h" | 37 #include "public/web/WebNavigationPolicy.h" |
38 #include "web/WebExport.h" | 38 #include "web/WebExport.h" |
39 #include <memory> | 39 #include <memory> |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 class PagePopup; | 43 class PagePopup; |
44 class PagePopupClient; | 44 class PagePopupClient; |
45 class WebViewImpl; | 45 class WebViewImpl; |
| 46 class WebFrameWidgetBase; |
46 struct WebCursorInfo; | 47 struct WebCursorInfo; |
47 | 48 |
48 // Handles window-level notifications from core on behalf of a WebView. | 49 // Handles window-level notifications from core on behalf of a WebView. |
49 class WEB_EXPORT ChromeClientImpl final : public ChromeClient { | 50 class WEB_EXPORT ChromeClientImpl final : public ChromeClient { |
50 public: | 51 public: |
51 static ChromeClientImpl* create(WebViewImpl*); | 52 static ChromeClientImpl* create(WebViewImpl*); |
52 ~ChromeClientImpl() override; | 53 ~ChromeClientImpl() override; |
53 | 54 |
54 void* webView() const override; | 55 void* webView() const override; |
55 | 56 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 ColorChooser* openColorChooser(LocalFrame*, | 130 ColorChooser* openColorChooser(LocalFrame*, |
130 ColorChooserClient*, | 131 ColorChooserClient*, |
131 const Color&) override; | 132 const Color&) override; |
132 DateTimeChooser* openDateTimeChooser( | 133 DateTimeChooser* openDateTimeChooser( |
133 DateTimeChooserClient*, | 134 DateTimeChooserClient*, |
134 const DateTimeChooserParameters&) override; | 135 const DateTimeChooserParameters&) override; |
135 void openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) override; | 136 void openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) override; |
136 void enumerateChosenDirectory(FileChooser*) override; | 137 void enumerateChosenDirectory(FileChooser*) override; |
137 void setCursor(const Cursor&, LocalFrame*) override; | 138 void setCursor(const Cursor&, LocalFrame*) override; |
138 Cursor lastSetCursorForTesting() const override; | 139 Cursor lastSetCursorForTesting() const override; |
139 void setEventListenerProperties(WebEventListenerClass, | 140 void setEventListenerProperties(LocalFrame*, |
| 141 WebEventListenerClass, |
140 WebEventListenerProperties) override; | 142 WebEventListenerProperties) override; |
141 WebEventListenerProperties eventListenerProperties( | 143 WebEventListenerProperties eventListenerProperties( |
| 144 LocalFrame*, |
142 WebEventListenerClass) const override; | 145 WebEventListenerClass) const override; |
143 void setHasScrollEventHandlers(bool hasEventHandlers) override; | 146 void setHasScrollEventHandlers(LocalFrame*, bool hasEventHandlers) override; |
144 bool hasScrollEventHandlers() const override; | |
145 void setTouchAction(LocalFrame*, TouchAction) override; | 147 void setTouchAction(LocalFrame*, TouchAction) override; |
146 | 148 |
147 void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override; | 149 void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override; |
148 | 150 |
149 void attachRootLayer(WebLayer*, LocalFrame* localRoot) override; | 151 void attachRootLayer(WebLayer*, LocalFrame* localRoot) override; |
150 | 152 |
151 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*, | 153 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*, |
152 LocalFrame*) override; | 154 LocalFrame*) override; |
153 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*, | 155 void detachCompositorAnimationTimeline(CompositorAnimationTimeline*, |
154 LocalFrame*) override; | 156 LocalFrame*) override; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 223 |
222 void installSupplements(LocalFrame&) override; | 224 void installSupplements(LocalFrame&) override; |
223 | 225 |
224 private: | 226 private: |
225 explicit ChromeClientImpl(WebViewImpl*); | 227 explicit ChromeClientImpl(WebViewImpl*); |
226 | 228 |
227 bool isChromeClientImpl() const override { return true; } | 229 bool isChromeClientImpl() const override { return true; } |
228 void registerPopupOpeningObserver(PopupOpeningObserver*) override; | 230 void registerPopupOpeningObserver(PopupOpeningObserver*) override; |
229 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override; | 231 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override; |
230 | 232 |
| 233 void setEventListenerProperties(WebFrameWidgetBase&, |
| 234 WebEventListenerClass, |
| 235 WebEventListenerProperties); |
| 236 |
231 void setCursor(const WebCursorInfo&, LocalFrame*); | 237 void setCursor(const WebCursorInfo&, LocalFrame*); |
232 | 238 |
233 WebViewImpl* m_webView; // Weak pointer. | 239 WebViewImpl* m_webView; // Weak pointer. |
234 WindowFeatures m_windowFeatures; | 240 WindowFeatures m_windowFeatures; |
235 Vector<PopupOpeningObserver*> m_popupOpeningObservers; | 241 Vector<PopupOpeningObserver*> m_popupOpeningObservers; |
236 Cursor m_lastSetMouseCursorForTesting; | 242 Cursor m_lastSetMouseCursorForTesting; |
237 bool m_cursorOverridden; | 243 bool m_cursorOverridden; |
238 bool m_didRequestNonEmptyToolTip; | 244 bool m_didRequestNonEmptyToolTip; |
239 }; | 245 }; |
240 | 246 |
241 DEFINE_TYPE_CASTS(ChromeClientImpl, | 247 DEFINE_TYPE_CASTS(ChromeClientImpl, |
242 ChromeClient, | 248 ChromeClient, |
243 client, | 249 client, |
244 client->isChromeClientImpl(), | 250 client->isChromeClientImpl(), |
245 client.isChromeClientImpl()); | 251 client.isChromeClientImpl()); |
246 | 252 |
247 } // namespace blink | 253 } // namespace blink |
248 | 254 |
249 #endif | 255 #endif |
OLD | NEW |