summaryrefslogtreecommitdiffstats
path: root/components/html_viewer/web_layer_impl.h
blob: e245d1f768e9e9d594776f57b135ef43d1da2721 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// 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.

#ifndef COMPONENTS_HTML_VIEWER_WEB_LAYER_IMPL_H_
#define COMPONENTS_HTML_VIEWER_WEB_LAYER_IMPL_H_

#include <utility>

#include "cc/blink/web_layer_impl.h"
#include "cc/layers/surface_layer.h"

namespace mus {
class View;
}

namespace html_viewer {

class WebLayerImpl : public cc_blink::WebLayerImpl {
 public:
  WebLayerImpl(mus::View* view, float device_pixel_ratio);
  ~WebLayerImpl() override;

  // WebLayer implementation.
  void setBounds(const blink::WebSize& bounds) override;

 private:
  mus::View* view_;
  const float device_pixel_ratio_;
  scoped_refptr<cc::SurfaceLayer> layer_;

  DISALLOW_COPY_AND_ASSIGN(WebLayerImpl);
};

}  // namespace html_viewer

#endif  // COMPONENTS_HTML_VIEWER_WEB_LAYER_IMPL_H_