| 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 24 matching lines...) Expand all Loading... |
| 35 #include "core/page/ChromeClient.h" | 35 #include "core/page/ChromeClient.h" |
| 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 WebLayerTreeView; |
| 46 class WebLocalFrame; |
| 45 class WebViewImpl; | 47 class WebViewImpl; |
| 46 struct WebCursorInfo; | 48 struct WebCursorInfo; |
| 47 | 49 |
| 48 // Handles window-level notifications from core on behalf of a WebView. | 50 // Handles window-level notifications from core on behalf of a WebView. |
| 49 class WEB_EXPORT ChromeClientImpl final : public ChromeClient { | 51 class WEB_EXPORT ChromeClientImpl final : public ChromeClient { |
| 50 public: | 52 public: |
| 51 static ChromeClientImpl* create(WebViewImpl*); | 53 static ChromeClientImpl* create(WebViewImpl*); |
| 52 ~ChromeClientImpl() override; | 54 ~ChromeClientImpl() override; |
| 53 | 55 |
| 54 void* webView() const override; | 56 void* webView() const override; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 ColorChooser* openColorChooser(LocalFrame*, | 131 ColorChooser* openColorChooser(LocalFrame*, |
| 130 ColorChooserClient*, | 132 ColorChooserClient*, |
| 131 const Color&) override; | 133 const Color&) override; |
| 132 DateTimeChooser* openDateTimeChooser( | 134 DateTimeChooser* openDateTimeChooser( |
| 133 DateTimeChooserClient*, | 135 DateTimeChooserClient*, |
| 134 const DateTimeChooserParameters&) override; | 136 const DateTimeChooserParameters&) override; |
| 135 void openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) override; | 137 void openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) override; |
| 136 void enumerateChosenDirectory(FileChooser*) override; | 138 void enumerateChosenDirectory(FileChooser*) override; |
| 137 void setCursor(const Cursor&, LocalFrame*) override; | 139 void setCursor(const Cursor&, LocalFrame*) override; |
| 138 Cursor lastSetCursorForTesting() const override; | 140 Cursor lastSetCursorForTesting() const override; |
| 139 void setEventListenerProperties(WebEventListenerClass, | 141 void setEventListenerProperties(LocalFrame*, |
| 142 WebEventListenerClass, |
| 140 WebEventListenerProperties) override; | 143 WebEventListenerProperties) override; |
| 141 WebEventListenerProperties eventListenerProperties( | 144 WebEventListenerProperties eventListenerProperties( |
| 145 LocalFrame*, |
| 142 WebEventListenerClass) const override; | 146 WebEventListenerClass) const override; |
| 143 void setHasScrollEventHandlers(bool hasEventHandlers) override; | 147 void setHasScrollEventHandlers(bool hasEventHandlers) override; |
| 144 bool hasScrollEventHandlers() const override; | 148 bool hasScrollEventHandlers() const override; |
| 145 void setTouchAction(TouchAction) override; | 149 void setTouchAction(TouchAction) override; |
| 146 | 150 |
| 147 void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override; | 151 void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override; |
| 148 | 152 |
| 149 void attachRootLayer(WebLayer*, LocalFrame* localRoot) override; | 153 void attachRootLayer(WebLayer*, LocalFrame* localRoot) override; |
| 150 | 154 |
| 151 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*, | 155 void attachCompositorAnimationTimeline(CompositorAnimationTimeline*, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 223 |
| 220 void installSupplements(LocalFrame&) override; | 224 void installSupplements(LocalFrame&) override; |
| 221 | 225 |
| 222 private: | 226 private: |
| 223 explicit ChromeClientImpl(WebViewImpl*); | 227 explicit ChromeClientImpl(WebViewImpl*); |
| 224 | 228 |
| 225 bool isChromeClientImpl() const override { return true; } | 229 bool isChromeClientImpl() const override { return true; } |
| 226 void registerPopupOpeningObserver(PopupOpeningObserver*) override; | 230 void registerPopupOpeningObserver(PopupOpeningObserver*) override; |
| 227 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override; | 231 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override; |
| 228 | 232 |
| 233 void setEventListenerProperties(WebLayerTreeView*, |
| 234 WebEventListenerClass, |
| 235 WebEventListenerProperties); |
| 236 WebEventListenerProperties eventListenerProperties( |
| 237 WebLayerTreeView*, |
| 238 WebEventListenerClass) const; |
| 239 |
| 229 void setCursor(const WebCursorInfo&, LocalFrame*); | 240 void setCursor(const WebCursorInfo&, LocalFrame*); |
| 230 | 241 |
| 231 WebViewImpl* m_webView; // Weak pointer. | 242 WebViewImpl* m_webView; // Weak pointer. |
| 232 WindowFeatures m_windowFeatures; | 243 WindowFeatures m_windowFeatures; |
| 233 Vector<PopupOpeningObserver*> m_popupOpeningObservers; | 244 Vector<PopupOpeningObserver*> m_popupOpeningObservers; |
| 234 Cursor m_lastSetMouseCursorForTesting; | 245 Cursor m_lastSetMouseCursorForTesting; |
| 235 bool m_cursorOverridden; | 246 bool m_cursorOverridden; |
| 236 bool m_didRequestNonEmptyToolTip; | 247 bool m_didRequestNonEmptyToolTip; |
| 237 }; | 248 }; |
| 238 | 249 |
| 239 DEFINE_TYPE_CASTS(ChromeClientImpl, | 250 DEFINE_TYPE_CASTS(ChromeClientImpl, |
| 240 ChromeClient, | 251 ChromeClient, |
| 241 client, | 252 client, |
| 242 client->isChromeClientImpl(), | 253 client->isChromeClientImpl(), |
| 243 client.isChromeClientImpl()); | 254 client.isChromeClientImpl()); |
| 244 | 255 |
| 245 } // namespace blink | 256 } // namespace blink |
| 246 | 257 |
| 247 #endif | 258 #endif |
| OLD | NEW |