Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebLocalFrameImpl_h | 31 #ifndef WebLocalFrameImpl_h |
| 32 #define WebLocalFrameImpl_h | 32 #define WebLocalFrameImpl_h |
| 33 | 33 |
| 34 #include "core/editing/VisiblePosition.h" | 34 #include "core/editing/VisiblePosition.h" |
| 35 #include "core/frame/ContentSettingsClient.h" | |
| 35 #include "core/frame/LocalFrame.h" | 36 #include "core/frame/LocalFrame.h" |
| 36 #include "platform/geometry/FloatRect.h" | 37 #include "platform/geometry/FloatRect.h" |
| 37 #include "platform/heap/SelfKeepAlive.h" | 38 #include "platform/heap/SelfKeepAlive.h" |
| 38 #include "public/platform/WebFileSystemType.h" | 39 #include "public/platform/WebFileSystemType.h" |
| 39 #include "public/web/WebLocalFrame.h" | 40 #include "public/web/WebLocalFrame.h" |
| 40 #include "web/LocalFrameClientImpl.h" | 41 #include "web/LocalFrameClientImpl.h" |
| 41 #include "web/UserMediaClientImpl.h" | 42 #include "web/UserMediaClientImpl.h" |
| 42 #include "web/WebExport.h" | 43 #include "web/WebExport.h" |
| 43 #include "web/WebFrameImplBase.h" | 44 #include "web/WebFrameImplBase.h" |
| 44 #include "web/WebFrameWidgetBase.h" | 45 #include "web/WebFrameWidgetBase.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 : public WebFrameImplBase, | 85 : public WebFrameImplBase, |
| 85 NON_EXPORTED_BASE(public WebLocalFrame) { | 86 NON_EXPORTED_BASE(public WebLocalFrame) { |
| 86 public: | 87 public: |
| 87 // WebFrame methods: | 88 // WebFrame methods: |
| 88 // TODO(dcheng): Fix sorting here; a number of method have been moved to | 89 // TODO(dcheng): Fix sorting here; a number of method have been moved to |
| 89 // WebLocalFrame but not correctly updated here. | 90 // WebLocalFrame but not correctly updated here. |
| 90 void close() override; | 91 void close() override; |
| 91 WebString assignedName() const override; | 92 WebString assignedName() const override; |
| 92 void setName(const WebString&) override; | 93 void setName(const WebString&) override; |
| 93 WebVector<WebIconURL> iconURLs(int iconTypesMask) const override; | 94 WebVector<WebIconURL> iconURLs(int iconTypesMask) const override; |
| 94 void setContentSettingsClient(WebContentSettingsClient*) override; | |
| 95 void setSharedWorkerRepositoryClient( | 95 void setSharedWorkerRepositoryClient( |
| 96 WebSharedWorkerRepositoryClient*) override; | 96 WebSharedWorkerRepositoryClient*) override; |
| 97 WebSize getScrollOffset() const override; | 97 WebSize getScrollOffset() const override; |
| 98 void setScrollOffset(const WebSize&) override; | 98 void setScrollOffset(const WebSize&) override; |
| 99 WebSize contentsSize() const override; | 99 WebSize contentsSize() const override; |
| 100 bool hasVisibleContent() const override; | 100 bool hasVisibleContent() const override; |
| 101 WebRect visibleContentRect() const override; | 101 WebRect visibleContentRect() const override; |
| 102 bool hasHorizontalScrollbar() const override; | 102 bool hasHorizontalScrollbar() const override; |
| 103 bool hasVerticalScrollbar() const override; | 103 bool hasVerticalScrollbar() const override; |
| 104 WebView* view() const override; | 104 WebView* view() const override; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 unsigned length, | 175 unsigned length, |
| 176 WebRect&) const override; | 176 WebRect&) const override; |
| 177 size_t characterIndexForPoint(const WebPoint&) const override; | 177 size_t characterIndexForPoint(const WebPoint&) const override; |
| 178 bool executeCommand(const WebString&) override; | 178 bool executeCommand(const WebString&) override; |
| 179 bool executeCommand(const WebString&, const WebString& value) override; | 179 bool executeCommand(const WebString&, const WebString& value) override; |
| 180 bool isCommandEnabled(const WebString&) const override; | 180 bool isCommandEnabled(const WebString&) const override; |
| 181 void enableSpellChecking(bool) override; | 181 void enableSpellChecking(bool) override; |
| 182 bool isSpellCheckingEnabled() const override; | 182 bool isSpellCheckingEnabled() const override; |
| 183 void replaceMisspelledRange(const WebString&) override; | 183 void replaceMisspelledRange(const WebString&) override; |
| 184 void removeSpellingMarkers() override; | 184 void removeSpellingMarkers() override; |
| 185 void setContentSettingsClient(WebContentSettingsClient*) override; | |
| 185 bool hasSelection() const override; | 186 bool hasSelection() const override; |
| 186 WebRange selectionRange() const override; | 187 WebRange selectionRange() const override; |
| 187 WebString selectionAsText() const override; | 188 WebString selectionAsText() const override; |
| 188 WebString selectionAsMarkup() const override; | 189 WebString selectionAsMarkup() const override; |
| 189 bool selectWordAroundCaret() override; | 190 bool selectWordAroundCaret() override; |
| 190 void selectRange(const WebPoint& base, const WebPoint& extent) override; | 191 void selectRange(const WebPoint& base, const WebPoint& extent) override; |
| 191 void selectRange(const WebRange&) override; | 192 void selectRange(const WebRange&) override; |
| 192 WebString rangeAsText(const WebRange&) override; | 193 WebString rangeAsText(const WebRange&) override; |
| 193 void moveRangeSelectionExtent(const WebPoint&) override; | 194 void moveRangeSelectionExtent(const WebPoint&) override; |
| 194 void moveRangeSelection( | 195 void moveRangeSelection( |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 void didFinish(); | 383 void didFinish(); |
| 383 | 384 |
| 384 // Sets whether the WebLocalFrameImpl allows its document to be scrolled. | 385 // Sets whether the WebLocalFrameImpl allows its document to be scrolled. |
| 385 // If the parameter is true, allow the document to be scrolled. | 386 // If the parameter is true, allow the document to be scrolled. |
| 386 // Otherwise, disallow scrolling. | 387 // Otherwise, disallow scrolling. |
| 387 void setCanHaveScrollbars(bool) override; | 388 void setCanHaveScrollbars(bool) override; |
| 388 | 389 |
| 389 WebFrameClient* client() const { return m_client; } | 390 WebFrameClient* client() const { return m_client; } |
| 390 void setClient(WebFrameClient* client) { m_client = client; } | 391 void setClient(WebFrameClient* client) { m_client = client; } |
| 391 | 392 |
| 392 WebContentSettingsClient* contentSettingsClient() { | 393 ContentSettingsClient& contentSettingsClient() { |
| 393 return m_contentSettingsClient; | 394 return m_contentSettingsClient; |
| 394 } | 395 } |
| 396 | |
| 395 SharedWorkerRepositoryClientImpl* sharedWorkerRepositoryClient() const { | 397 SharedWorkerRepositoryClientImpl* sharedWorkerRepositoryClient() const { |
| 396 return m_sharedWorkerRepositoryClient.get(); | 398 return m_sharedWorkerRepositoryClient.get(); |
| 397 } | 399 } |
| 398 | 400 |
| 399 void setInputEventsTransformForEmulation(const IntSize&, float); | 401 void setInputEventsTransformForEmulation(const IntSize&, float); |
| 400 | 402 |
| 401 static void selectWordAroundPosition(LocalFrame*, VisiblePosition); | 403 static void selectWordAroundPosition(LocalFrame*, VisiblePosition); |
| 402 | 404 |
| 403 TextFinder* textFinder() const; | 405 TextFinder* textFinder() const; |
| 404 // Returns the text finder object if it already exists. | 406 // Returns the text finder object if it already exists. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 464 Member<LocalFrame> m_frame; | 466 Member<LocalFrame> m_frame; |
| 465 | 467 |
| 466 Member<WebDevToolsAgentImpl> m_devToolsAgent; | 468 Member<WebDevToolsAgentImpl> m_devToolsAgent; |
| 467 | 469 |
| 468 // This is set if the frame is the root of a local frame tree, and requires a | 470 // This is set if the frame is the root of a local frame tree, and requires a |
| 469 // widget for layout. | 471 // widget for layout. |
| 470 WebFrameWidgetBase* m_frameWidget; | 472 WebFrameWidgetBase* m_frameWidget; |
| 471 | 473 |
| 472 WebFrameClient* m_client; | 474 WebFrameClient* m_client; |
| 473 WebAutofillClient* m_autofillClient; | 475 WebAutofillClient* m_autofillClient; |
| 474 WebContentSettingsClient* m_contentSettingsClient; | 476 ContentSettingsClient m_contentSettingsClient; |
|
haraken
2017/04/04 11:25:32
I'm wondering if WebLocalFrameImpl is a right obje
kinuko
2017/04/04 14:50:57
Yep- I don't think this would be the best place ei
haraken
2017/04/05 02:31:07
Yeah, I want to think about cleaning up these thin
| |
| 475 std::unique_ptr<SharedWorkerRepositoryClientImpl> | 477 std::unique_ptr<SharedWorkerRepositoryClientImpl> |
| 476 m_sharedWorkerRepositoryClient; | 478 m_sharedWorkerRepositoryClient; |
| 477 | 479 |
| 478 // Will be initialized after first call to ensureTextFinder(). | 480 // Will be initialized after first call to ensureTextFinder(). |
| 479 Member<TextFinder> m_textFinder; | 481 Member<TextFinder> m_textFinder; |
| 480 | 482 |
| 481 // Valid between calls to BeginPrint() and EndPrint(). Containts the print | 483 // Valid between calls to BeginPrint() and EndPrint(). Containts the print |
| 482 // information. Is used by PrintPage(). | 484 // information. Is used by PrintPage(). |
| 483 Member<ChromePrintContext> m_printContext; | 485 Member<ChromePrintContext> m_printContext; |
| 484 | 486 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 505 | 507 |
| 506 DEFINE_TYPE_CASTS(WebLocalFrameImpl, | 508 DEFINE_TYPE_CASTS(WebLocalFrameImpl, |
| 507 WebFrame, | 509 WebFrame, |
| 508 frame, | 510 frame, |
| 509 frame->isWebLocalFrame(), | 511 frame->isWebLocalFrame(), |
| 510 frame.isWebLocalFrame()); | 512 frame.isWebLocalFrame()); |
| 511 | 513 |
| 512 } // namespace blink | 514 } // namespace blink |
| 513 | 515 |
| 514 #endif | 516 #endif |
| OLD | NEW |