| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 String& result); | 173 String& result); |
| 174 virtual void setStatusbarText(const String&) = 0; | 174 virtual void setStatusbarText(const String&) = 0; |
| 175 virtual bool tabsToLinks() = 0; | 175 virtual bool tabsToLinks() = 0; |
| 176 | 176 |
| 177 virtual void* webView() const = 0; | 177 virtual void* webView() const = 0; |
| 178 | 178 |
| 179 // Methods used by HostWindow. | 179 // Methods used by HostWindow. |
| 180 virtual WebScreenInfo screenInfo() const = 0; | 180 virtual WebScreenInfo screenInfo() const = 0; |
| 181 virtual void setCursor(const Cursor&, LocalFrame* localRoot) = 0; | 181 virtual void setCursor(const Cursor&, LocalFrame* localRoot) = 0; |
| 182 // End methods used by HostWindow. | 182 // End methods used by HostWindow. |
| 183 |
| 183 virtual Cursor lastSetCursorForTesting() const = 0; | 184 virtual Cursor lastSetCursorForTesting() const = 0; |
| 185 Node* lastSetTooltipNodeForTesting() const { |
| 186 return m_lastMouseOverNode.get(); |
| 187 } |
| 184 | 188 |
| 185 // Returns a custom visible content rect if a viewport override is active. | 189 // Returns a custom visible content rect if a viewport override is active. |
| 186 virtual WTF::Optional<IntRect> visibleContentRectForPainting() const { | 190 virtual WTF::Optional<IntRect> visibleContentRectForPainting() const { |
| 187 return WTF::nullopt; | 191 return WTF::nullopt; |
| 188 } | 192 } |
| 189 | 193 |
| 190 virtual void dispatchViewportPropertiesDidChange( | 194 virtual void dispatchViewportPropertiesDidChange( |
| 191 const ViewportDescription&) const {} | 195 const ViewportDescription&) const {} |
| 192 | 196 |
| 193 virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const = 0; | 197 virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const = 0; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 335 |
| 332 virtual std::unique_ptr<WebFrameScheduler> createFrameScheduler( | 336 virtual std::unique_ptr<WebFrameScheduler> createFrameScheduler( |
| 333 BlameContext*) = 0; | 337 BlameContext*) = 0; |
| 334 | 338 |
| 335 // Returns the time of the beginning of the last beginFrame, in seconds, if | 339 // Returns the time of the beginning of the last beginFrame, in seconds, if |
| 336 // any, and 0.0 otherwise. | 340 // any, and 0.0 otherwise. |
| 337 virtual double lastFrameTimeMonotonic() const { return 0.0; } | 341 virtual double lastFrameTimeMonotonic() const { return 0.0; } |
| 338 | 342 |
| 339 virtual void installSupplements(LocalFrame&) {} | 343 virtual void installSupplements(LocalFrame&) {} |
| 340 | 344 |
| 345 DECLARE_TRACE(); |
| 346 |
| 341 protected: | 347 protected: |
| 342 ~ChromeClient() override {} | 348 ~ChromeClient() override {} |
| 343 | 349 |
| 344 virtual void showMouseOverURL(const HitTestResult&) = 0; | 350 virtual void showMouseOverURL(const HitTestResult&) = 0; |
| 345 virtual void setWindowRect(const IntRect&, LocalFrame&) = 0; | 351 virtual void setWindowRect(const IntRect&, LocalFrame&) = 0; |
| 346 virtual bool openBeforeUnloadConfirmPanelDelegate(LocalFrame*, | 352 virtual bool openBeforeUnloadConfirmPanelDelegate(LocalFrame*, |
| 347 bool isReload) = 0; | 353 bool isReload) = 0; |
| 348 virtual bool openJavaScriptAlertDelegate(LocalFrame*, const String&) = 0; | 354 virtual bool openJavaScriptAlertDelegate(LocalFrame*, const String&) = 0; |
| 349 virtual bool openJavaScriptConfirmDelegate(LocalFrame*, const String&) = 0; | 355 virtual bool openJavaScriptConfirmDelegate(LocalFrame*, const String&) = 0; |
| 350 virtual bool openJavaScriptPromptDelegate(LocalFrame*, | 356 virtual bool openJavaScriptPromptDelegate(LocalFrame*, |
| 351 const String& message, | 357 const String& message, |
| 352 const String& defaultValue, | 358 const String& defaultValue, |
| 353 String& result) = 0; | 359 String& result) = 0; |
| 354 virtual void printDelegate(LocalFrame*) = 0; | 360 virtual void printDelegate(LocalFrame*) = 0; |
| 355 | 361 |
| 356 private: | 362 private: |
| 357 bool canOpenModalIfDuringPageDismissal(Frame* mainFrame, | 363 bool canOpenModalIfDuringPageDismissal(Frame* mainFrame, |
| 358 DialogType, | 364 DialogType, |
| 359 const String& message); | 365 const String& message); |
| 360 void setToolTip(LocalFrame&, const HitTestResult&); | 366 void setToolTip(LocalFrame&, const HitTestResult&); |
| 361 | 367 |
| 368 WeakMember<Node> m_lastMouseOverNode; |
| 362 LayoutPoint m_lastToolTipPoint; | 369 LayoutPoint m_lastToolTipPoint; |
| 363 String m_lastToolTipText; | 370 String m_lastToolTipText; |
| 364 | 371 |
| 365 FRIEND_TEST_ALL_PREFIXES(ChromeClientTest, SetToolTipFlood); | 372 FRIEND_TEST_ALL_PREFIXES(ChromeClientTest, SetToolTipFlood); |
| 366 }; | 373 }; |
| 367 | 374 |
| 368 } // namespace blink | 375 } // namespace blink |
| 369 | 376 |
| 370 #endif // ChromeClient_h | 377 #endif // ChromeClient_h |
| OLD | NEW |