| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 void unmarkText() override; | 173 void unmarkText() override; |
| 174 bool hasMarkedText() const override; | 174 bool hasMarkedText() const override; |
| 175 WebRange markedRange() const override; | 175 WebRange markedRange() const override; |
| 176 bool firstRectForCharacterRange(unsigned location, | 176 bool firstRectForCharacterRange(unsigned location, |
| 177 unsigned length, | 177 unsigned length, |
| 178 WebRect&) const override; | 178 WebRect&) const override; |
| 179 size_t characterIndexForPoint(const WebPoint&) const override; | 179 size_t characterIndexForPoint(const WebPoint&) const override; |
| 180 bool executeCommand(const WebString&) override; | 180 bool executeCommand(const WebString&) override; |
| 181 bool executeCommand(const WebString&, const WebString& value) override; | 181 bool executeCommand(const WebString&, const WebString& value) override; |
| 182 bool isCommandEnabled(const WebString&) const override; | 182 bool isCommandEnabled(const WebString&) const override; |
| 183 void setTextCheckClient(WebTextCheckClient*) override; |
| 183 void enableSpellChecking(bool) override; | 184 void enableSpellChecking(bool) override; |
| 184 bool isSpellCheckingEnabled() const override; | 185 bool isSpellCheckingEnabled() const override; |
| 185 void replaceMisspelledRange(const WebString&) override; | 186 void replaceMisspelledRange(const WebString&) override; |
| 186 void removeSpellingMarkers() override; | 187 void removeSpellingMarkers() override; |
| 187 void setContentSettingsClient(WebContentSettingsClient*) override; | 188 void setContentSettingsClient(WebContentSettingsClient*) override; |
| 188 bool hasSelection() const override; | 189 bool hasSelection() const override; |
| 189 WebRange selectionRange() const override; | 190 WebRange selectionRange() const override; |
| 190 WebString selectionAsText() const override; | 191 WebString selectionAsText() const override; |
| 191 WebString selectionAsMarkup() const override; | 192 WebString selectionAsMarkup() const override; |
| 192 bool selectWordAroundCaret() override; | 193 bool selectWordAroundCaret() override; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 399 |
| 399 SharedWorkerRepositoryClientImpl* sharedWorkerRepositoryClient() const { | 400 SharedWorkerRepositoryClientImpl* sharedWorkerRepositoryClient() const { |
| 400 return m_sharedWorkerRepositoryClient.get(); | 401 return m_sharedWorkerRepositoryClient.get(); |
| 401 } | 402 } |
| 402 | 403 |
| 403 void setInputEventsTransformForEmulation(const IntSize&, float); | 404 void setInputEventsTransformForEmulation(const IntSize&, float); |
| 404 | 405 |
| 405 static void selectWordAroundPosition(LocalFrame*, VisiblePosition); | 406 static void selectWordAroundPosition(LocalFrame*, VisiblePosition); |
| 406 | 407 |
| 407 TextCheckerClient& textCheckerClient() const; | 408 TextCheckerClient& textCheckerClient() const; |
| 409 WebTextCheckClient* textCheckClient() const { return m_textCheckClient; } |
| 408 | 410 |
| 409 TextFinder* textFinder() const; | 411 TextFinder* textFinder() const; |
| 410 // Returns the text finder object if it already exists. | 412 // Returns the text finder object if it already exists. |
| 411 // Otherwise creates it and then returns. | 413 // Otherwise creates it and then returns. |
| 412 TextFinder& ensureTextFinder(); | 414 TextFinder& ensureTextFinder(); |
| 413 | 415 |
| 414 // Returns a hit-tested VisiblePosition for the given point | 416 // Returns a hit-tested VisiblePosition for the given point |
| 415 VisiblePosition visiblePositionForViewportPoint(const WebPoint&); | 417 VisiblePosition visiblePositionForViewportPoint(const WebPoint&); |
| 416 | 418 |
| 417 void setFrameWidget(WebFrameWidgetBase*); | 419 void setFrameWidget(WebFrameWidgetBase*); |
| 418 | 420 |
| 419 // DevTools front-end bindings. | 421 // DevTools front-end bindings. |
| 420 void setDevToolsFrontend(WebDevToolsFrontendImpl* frontend) { | 422 void setDevToolsFrontend(WebDevToolsFrontendImpl* frontend) { |
| 421 m_webDevToolsFrontend = frontend; | 423 m_webDevToolsFrontend = frontend; |
| 422 } | 424 } |
| 423 WebDevToolsFrontendImpl* devToolsFrontend() { return m_webDevToolsFrontend; } | 425 WebDevToolsFrontendImpl* devToolsFrontend() { return m_webDevToolsFrontend; } |
| 424 | 426 |
| 425 WebNode contextMenuNode() const { return m_contextMenuNode.get(); } | 427 WebNode contextMenuNode() const { return m_contextMenuNode.get(); } |
| 426 void setContextMenuNode(Node* node) { m_contextMenuNode = node; } | 428 void setContextMenuNode(Node* node) { m_contextMenuNode = node; } |
| 427 void clearContextMenuNode() { m_contextMenuNode.clear(); } | 429 void clearContextMenuNode() { m_contextMenuNode.clear(); } |
| 428 | 430 |
| 429 | |
| 430 DECLARE_TRACE(); | 431 DECLARE_TRACE(); |
| 431 | 432 |
| 432 private: | 433 private: |
| 433 friend class LocalFrameClientImpl; | 434 friend class LocalFrameClientImpl; |
| 434 | 435 |
| 435 WebLocalFrameImpl(WebTreeScopeType, | 436 WebLocalFrameImpl(WebTreeScopeType, |
| 436 WebFrameClient*, | 437 WebFrameClient*, |
| 437 blink::InterfaceProvider*, | 438 blink::InterfaceProvider*, |
| 438 blink::InterfaceRegistry*); | 439 blink::InterfaceRegistry*); |
| 439 WebLocalFrameImpl(WebRemoteFrame*, | 440 WebLocalFrameImpl(WebRemoteFrame*, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 // Borrowed pointers to Mojo objects. | 497 // Borrowed pointers to Mojo objects. |
| 497 blink::InterfaceProvider* m_interfaceProvider; | 498 blink::InterfaceProvider* m_interfaceProvider; |
| 498 blink::InterfaceRegistry* m_interfaceRegistry; | 499 blink::InterfaceRegistry* m_interfaceRegistry; |
| 499 | 500 |
| 500 WebDevToolsFrontendImpl* m_webDevToolsFrontend; | 501 WebDevToolsFrontendImpl* m_webDevToolsFrontend; |
| 501 | 502 |
| 502 Member<Node> m_contextMenuNode; | 503 Member<Node> m_contextMenuNode; |
| 503 | 504 |
| 504 std::unique_ptr<WebInputMethodControllerImpl> m_inputMethodController; | 505 std::unique_ptr<WebInputMethodControllerImpl> m_inputMethodController; |
| 505 | 506 |
| 506 // Stores the TextCheckerClient which communicates with SpellCheckProvider. | 507 // Stores the TextCheckerClient to bridge SpellChecker and WebTextCheckClient. |
| 507 Member<TextCheckerClientImpl> m_textCheckerClient; | 508 Member<TextCheckerClientImpl> m_textCheckerClient; |
| 509 WebTextCheckClient* m_textCheckClient; |
| 508 | 510 |
| 509 // Oilpan: WebLocalFrameImpl must remain alive until close() is called. | 511 // Oilpan: WebLocalFrameImpl must remain alive until close() is called. |
| 510 // Accomplish that by keeping a self-referential Persistent<>. It is | 512 // Accomplish that by keeping a self-referential Persistent<>. It is |
| 511 // cleared upon close(). | 513 // cleared upon close(). |
| 512 SelfKeepAlive<WebLocalFrameImpl> m_selfKeepAlive; | 514 SelfKeepAlive<WebLocalFrameImpl> m_selfKeepAlive; |
| 513 }; | 515 }; |
| 514 | 516 |
| 515 DEFINE_TYPE_CASTS(WebLocalFrameImpl, | 517 DEFINE_TYPE_CASTS(WebLocalFrameImpl, |
| 516 WebFrame, | 518 WebFrame, |
| 517 frame, | 519 frame, |
| 518 frame->isWebLocalFrame(), | 520 frame->isWebLocalFrame(), |
| 519 frame.isWebLocalFrame()); | 521 frame.isWebLocalFrame()); |
| 520 | 522 |
| 521 } // namespace blink | 523 } // namespace blink |
| 522 | 524 |
| 523 #endif | 525 #endif |
| OLD | NEW |