OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 |
| 7 #include "core/rendering/RenderRemote.h" |
| 8 |
| 9 #include "core/editing/FrameSelection.h" |
| 10 #include "core/html/HTMLIFrameElement.h" |
| 11 #include "core/rendering/PaintInfo.h" |
| 12 #include "platform/geometry/LayoutPoint.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 RenderRemote::RenderRemote(HTMLIFrameElement* view) |
| 17 : RenderReplaced(view) |
| 18 { |
| 19 } |
| 20 |
| 21 RenderRemote::~RenderRemote() |
| 22 { |
| 23 } |
| 24 |
| 25 void RenderRemote::paintReplaced(PaintInfo& paintInfo, |
| 26 const LayoutPoint& paintOffset) { |
| 27 // Draw a gray background. This should be painted over by the actual |
| 28 // content. |
| 29 // TODO(mpcomplete): figure out what we should actually do here. |
| 30 GraphicsContext* context = paintInfo.context; |
| 31 |
| 32 IntRect paintRect = pixelSnappedIntRect(LayoutRect( |
| 33 paintOffset.x(), paintOffset.y(), contentWidth(), contentHeight())); |
| 34 context->setStrokeStyle(SolidStroke); |
| 35 context->setStrokeColor(Color::lightGray); |
| 36 context->setFillColor(Color::darkGray); |
| 37 context->drawRect(paintRect); |
| 38 } |
| 39 |
| 40 } // namespace blink |
OLD | NEW |