| 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 } | 462 } |
| 463 | 463 |
| 464 void computePageRects(const FloatRect& printRect, float headerHeight, float
footerHeight, float userScaleFactor, float& outPageHeight) override | 464 void computePageRects(const FloatRect& printRect, float headerHeight, float
footerHeight, float userScaleFactor, float& outPageHeight) override |
| 465 { | 465 { |
| 466 m_printParams.printContentArea = IntRect(printRect); | 466 m_printParams.printContentArea = IntRect(printRect); |
| 467 m_pageRects.fill(IntRect(printRect), m_plugin->printBegin(m_printParams)
); | 467 m_pageRects.fill(IntRect(printRect), m_plugin->printBegin(m_printParams)
); |
| 468 } | 468 } |
| 469 | 469 |
| 470 void computePageRectsWithPageSize(const FloatSize& pageSizeInPixels) overrid
e | 470 void computePageRectsWithPageSize(const FloatSize& pageSizeInPixels) overrid
e |
| 471 { | 471 { |
| 472 ASSERT_NOT_REACHED(); | 472 NOTREACHED(); |
| 473 } | 473 } |
| 474 | 474 |
| 475 protected: | 475 protected: |
| 476 // Spools the printed page, a subrect of frame(). Skip the scale step. | 476 // Spools the printed page, a subrect of frame(). Skip the scale step. |
| 477 // NativeTheme doesn't play well with scaling. Scaling is done browser side | 477 // NativeTheme doesn't play well with scaling. Scaling is done browser side |
| 478 // instead. Returns the scale to be applied. | 478 // instead. Returns the scale to be applied. |
| 479 float spoolPage(GraphicsContext& context, int pageNumber) override | 479 float spoolPage(GraphicsContext& context, int pageNumber) override |
| 480 { | 480 { |
| 481 IntRect pageRect = m_pageRects[pageNumber]; | 481 IntRect pageRect = m_pageRects[pageNumber]; |
| 482 m_plugin->printPage(pageNumber, context, pageRect); | 482 m_plugin->printPage(pageNumber, context, pageRect); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 return this; | 558 return this; |
| 559 } | 559 } |
| 560 | 560 |
| 561 bool WebLocalFrameImpl::isWebRemoteFrame() const | 561 bool WebLocalFrameImpl::isWebRemoteFrame() const |
| 562 { | 562 { |
| 563 return false; | 563 return false; |
| 564 } | 564 } |
| 565 | 565 |
| 566 WebRemoteFrame* WebLocalFrameImpl::toWebRemoteFrame() | 566 WebRemoteFrame* WebLocalFrameImpl::toWebRemoteFrame() |
| 567 { | 567 { |
| 568 ASSERT_NOT_REACHED(); | 568 NOTREACHED(); |
| 569 return 0; | 569 return 0; |
| 570 } | 570 } |
| 571 | 571 |
| 572 void WebLocalFrameImpl::close() | 572 void WebLocalFrameImpl::close() |
| 573 { | 573 { |
| 574 m_client = nullptr; | 574 m_client = nullptr; |
| 575 | 575 |
| 576 if (m_devToolsAgent) { | 576 if (m_devToolsAgent) { |
| 577 m_devToolsAgent->dispose(); | 577 m_devToolsAgent->dispose(); |
| 578 m_devToolsAgent.clear(); | 578 m_devToolsAgent.clear(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 604 { | 604 { |
| 605 // The URL to the icon may be in the header. As such, only | 605 // The URL to the icon may be in the header. As such, only |
| 606 // ask the loader for the icon if it's finished loading. | 606 // ask the loader for the icon if it's finished loading. |
| 607 if (frame()->document()->loadEventFinished()) | 607 if (frame()->document()->loadEventFinished()) |
| 608 return frame()->document()->iconURLs(iconTypesMask); | 608 return frame()->document()->iconURLs(iconTypesMask); |
| 609 return WebVector<WebIconURL>(); | 609 return WebVector<WebIconURL>(); |
| 610 } | 610 } |
| 611 | 611 |
| 612 void WebLocalFrameImpl::setRemoteWebLayer(WebLayer* webLayer) | 612 void WebLocalFrameImpl::setRemoteWebLayer(WebLayer* webLayer) |
| 613 { | 613 { |
| 614 ASSERT_NOT_REACHED(); | 614 NOTREACHED(); |
| 615 } | 615 } |
| 616 | 616 |
| 617 void WebLocalFrameImpl::setContentSettingsClient(WebContentSettingsClient* conte
ntSettingsClient) | 617 void WebLocalFrameImpl::setContentSettingsClient(WebContentSettingsClient* conte
ntSettingsClient) |
| 618 { | 618 { |
| 619 m_contentSettingsClient = contentSettingsClient; | 619 m_contentSettingsClient = contentSettingsClient; |
| 620 } | 620 } |
| 621 | 621 |
| 622 void WebLocalFrameImpl::setSharedWorkerRepositoryClient(WebSharedWorkerRepositor
yClient* client) | 622 void WebLocalFrameImpl::setSharedWorkerRepositoryClient(WebSharedWorkerRepositor
yClient* client) |
| 623 { | 623 { |
| 624 m_sharedWorkerRepositoryClient = SharedWorkerRepositoryClientImpl::create(cl
ient); | 624 m_sharedWorkerRepositoryClient = SharedWorkerRepositoryClientImpl::create(cl
ient); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 case WebConsoleMessage::LevelLog: | 763 case WebConsoleMessage::LevelLog: |
| 764 webCoreMessageLevel = LogMessageLevel; | 764 webCoreMessageLevel = LogMessageLevel; |
| 765 break; | 765 break; |
| 766 case WebConsoleMessage::LevelWarning: | 766 case WebConsoleMessage::LevelWarning: |
| 767 webCoreMessageLevel = WarningMessageLevel; | 767 webCoreMessageLevel = WarningMessageLevel; |
| 768 break; | 768 break; |
| 769 case WebConsoleMessage::LevelError: | 769 case WebConsoleMessage::LevelError: |
| 770 webCoreMessageLevel = ErrorMessageLevel; | 770 webCoreMessageLevel = ErrorMessageLevel; |
| 771 break; | 771 break; |
| 772 default: | 772 default: |
| 773 ASSERT_NOT_REACHED(); | 773 NOTREACHED(); |
| 774 return; | 774 return; |
| 775 } | 775 } |
| 776 | 776 |
| 777 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo
urce, webCoreMessageLevel, message.text, message.url, message.lineNumber, messag
e.columnNumber)); | 777 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo
urce, webCoreMessageLevel, message.text, message.url, message.lineNumber, messag
e.columnNumber)); |
| 778 } | 778 } |
| 779 | 779 |
| 780 void WebLocalFrameImpl::collectGarbage() | 780 void WebLocalFrameImpl::collectGarbage() |
| 781 { | 781 { |
| 782 if (!frame()) | 782 if (!frame()) |
| 783 return; | 783 return; |
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2172 return WebSandboxFlags::None; | 2172 return WebSandboxFlags::None; |
| 2173 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2173 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
| 2174 } | 2174 } |
| 2175 | 2175 |
| 2176 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2176 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
| 2177 { | 2177 { |
| 2178 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2178 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 2179 } | 2179 } |
| 2180 | 2180 |
| 2181 } // namespace blink | 2181 } // namespace blink |
| OLD | NEW |