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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderRemote.cpp
diff --git a/sky/engine/core/rendering/RenderRemote.cpp b/sky/engine/core/rendering/RenderRemote.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1ee502b0679f68987804bfd42a1aa534b22c72e1
--- /dev/null
+++ b/sky/engine/core/rendering/RenderRemote.cpp
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+
+#include "core/rendering/RenderRemote.h"
+
+#include "core/editing/FrameSelection.h"
+#include "core/html/HTMLIFrameElement.h"
+#include "core/rendering/PaintInfo.h"
+#include "platform/geometry/LayoutPoint.h"
+
+namespace blink {
+
+RenderRemote::RenderRemote(HTMLIFrameElement* view)
+ : RenderReplaced(view)
+{
+}
+
+RenderRemote::~RenderRemote()
+{
+}
+
+void RenderRemote::paintReplaced(PaintInfo& paintInfo,
+ const LayoutPoint& paintOffset) {
+ // Draw a gray background. This should be painted over by the actual
+ // content.
+ // TODO(mpcomplete): figure out what we should actually do here.
+ GraphicsContext* context = paintInfo.context;
+
+ IntRect paintRect = pixelSnappedIntRect(LayoutRect(
+ paintOffset.x(), paintOffset.y(), contentWidth(), contentHeight()));
+ context->setStrokeStyle(SolidStroke);
+ context->setStrokeColor(Color::lightGray);
+ context->setFillColor(Color::darkGray);
+ context->drawRect(paintRect);
+}
+
+} // namespace blink
« 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