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

Side by Side Diff: components/html_viewer/web_layer_impl.cc

Issue 1340983002: Mandoline UI Process: Update namespaces and file names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/html_viewer/web_layer_impl.h" 5 #include "components/html_viewer/web_layer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "components/mus/public/cpp/view.h" 9 #include "components/mus/public/cpp/view.h"
10 #include "ui/gfx/geometry/dip_util.h" 10 #include "ui/gfx/geometry/dip_util.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 // See surface_layer.h for a description of this callback. 25 // See surface_layer.h for a description of this callback.
26 void RequireCallback(cc::SurfaceId surface_id, 26 void RequireCallback(cc::SurfaceId surface_id,
27 cc::SurfaceSequence sequence) { 27 cc::SurfaceSequence sequence) {
28 // TODO(fsamuel): Implement this. 28 // TODO(fsamuel): Implement this.
29 } 29 }
30 30
31 } 31 }
32 32
33 WebLayerImpl::WebLayerImpl(mojo::View* view, float device_pixel_ratio) 33 WebLayerImpl::WebLayerImpl(mus::View* view, float device_pixel_ratio)
34 : cc_blink::WebLayerImpl(cc::SurfaceLayer::Create( 34 : cc_blink::WebLayerImpl(
35 cc_blink::WebLayerImpl::LayerSettings(), 35 cc::SurfaceLayer::Create(cc_blink::WebLayerImpl::LayerSettings(),
36 base::Bind(&SatisfyCallback), 36 base::Bind(&SatisfyCallback),
37 base::Bind(&RequireCallback))), 37 base::Bind(&RequireCallback))),
38 view_(view), 38 view_(view),
39 device_pixel_ratio_(device_pixel_ratio) { 39 device_pixel_ratio_(device_pixel_ratio) {}
40 }
41 40
42 WebLayerImpl::~WebLayerImpl() { 41 WebLayerImpl::~WebLayerImpl() {
43 } 42 }
44 43
45 void WebLayerImpl::setBounds(const WebSize& size) { 44 void WebLayerImpl::setBounds(const WebSize& size) {
46 static_cast<cc::SurfaceLayer*>(layer())-> 45 static_cast<cc::SurfaceLayer*>(layer())->
47 SetSurfaceId(cc::SurfaceId(view_->id()), 46 SetSurfaceId(cc::SurfaceId(view_->id()),
48 device_pixel_ratio_, size); 47 device_pixel_ratio_, size);
49 cc_blink::WebLayerImpl::setBounds(size); 48 cc_blink::WebLayerImpl::setBounds(size);
50 } 49 }
51 50
52 } // namespace html_viewer 51 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/web_layer_impl.h ('k') | components/html_viewer/web_layer_tree_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698