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

Unified Diff: components/html_viewer/web_layer_impl.cc

Issue 1373003002: html_viewer/Mandoline: Avoid subclassing WebLayerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 5 years, 3 months 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 | « components/html_viewer/web_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/web_layer_impl.cc
diff --git a/components/html_viewer/web_layer_impl.cc b/components/html_viewer/web_layer_impl.cc
deleted file mode 100644
index 6b56f93c9253fe93be14920303d6aa9387f1cdb5..0000000000000000000000000000000000000000
--- a/components/html_viewer/web_layer_impl.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2015 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 "components/html_viewer/web_layer_impl.h"
-
-#include "base/bind.h"
-#include "cc/layers/layer.h"
-#include "components/mus/public/cpp/view.h"
-#include "ui/gfx/geometry/dip_util.h"
-#include "ui/mojo/geometry/geometry.mojom.h"
-
-using blink::WebFloatPoint;
-using blink::WebSize;
-
-namespace html_viewer {
-
-namespace {
-
-// See surface_layer.h for a description of this callback.
-void SatisfyCallback(cc::SurfaceSequence sequence) {
- // TODO(fsamuel): Implement this.
-}
-
-// See surface_layer.h for a description of this callback.
-void RequireCallback(cc::SurfaceId surface_id,
- cc::SurfaceSequence sequence) {
- // TODO(fsamuel): Implement this.
-}
-
-}
-
-WebLayerImpl::WebLayerImpl(mus::View* view, float device_pixel_ratio)
- : cc_blink::WebLayerImpl(
- cc::SurfaceLayer::Create(cc_blink::WebLayerImpl::LayerSettings(),
- base::Bind(&SatisfyCallback),
- base::Bind(&RequireCallback))),
- view_(view),
- device_pixel_ratio_(device_pixel_ratio) {}
-
-WebLayerImpl::~WebLayerImpl() {
-}
-
-void WebLayerImpl::setBounds(const WebSize& size) {
- gfx::Size size_in_pixels =
- gfx::ScaleToCeiledSize(gfx::Size(size), device_pixel_ratio_);
- static_cast<cc::SurfaceLayer*>(layer())->
- SetSurfaceId(cc::SurfaceId(view_->id()),
- device_pixel_ratio_, size_in_pixels);
- cc_blink::WebLayerImpl::setBounds(size);
-}
-
-} // namespace html_viewer
« no previous file with comments | « components/html_viewer/web_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698