Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: sky/engine/core/rendering/RenderRemote.cpp

Issue 708903002: Initial work on a new <view> element backed by a mojo::View. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: m_URL Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/rendering/RenderRemote.h ('k') | sky/engine/public/web/WebFrameClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderRemote.h ('k') | sky/engine/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698