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

Side by Side Diff: views/layer_property_setter.cc

Issue 8362006: Reland r107720 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 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 | Annotate | Revision Log
« no previous file with comments | « views/layer_property_setter.h ('k') | views/view.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 (c) 2011 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 "views/layer_property_setter.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "ui/gfx/compositor/compositor.h"
9 #include "ui/gfx/compositor/layer.h"
10
11 namespace views {
12
13 namespace {
14
15 // DefaultSetter ---------------------------------------------------------------
16
17 class DefaultSetter : public LayerPropertySetter {
18 public:
19 DefaultSetter();
20
21 // LayerPropertySetter:
22 virtual void Installed(ui::Layer* layer) OVERRIDE;
23 virtual void Uninstalled(ui::Layer* layer) OVERRIDE;
24 virtual void SetTransform(ui::Layer* layer,
25 const ui::Transform& transform) OVERRIDE;
26 virtual void SetBounds(ui::Layer* layer, const gfx::Rect& bounds) OVERRIDE;
27
28 private:
29 DISALLOW_COPY_AND_ASSIGN(DefaultSetter);
30 };
31
32 DefaultSetter::DefaultSetter() {
33 }
34
35 void DefaultSetter::Installed(ui::Layer* layer) {
36 }
37
38 void DefaultSetter::Uninstalled(ui::Layer* layer) {
39 }
40
41 void DefaultSetter::SetTransform(ui::Layer* layer,
42 const ui::Transform& transform) {
43 layer->SetTransform(transform);
44 }
45
46 void DefaultSetter::SetBounds(ui::Layer* layer, const gfx::Rect& bounds) {
47 layer->SetBounds(bounds);
48 }
49
50 } // namespace
51
52 // LayerPropertySetter ---------------------------------------------------------
53
54 // static
55 LayerPropertySetter* LayerPropertySetter::CreateDefaultSetter() {
56 return new DefaultSetter;
57 }
58
59 } // namespace views
OLDNEW
« no previous file with comments | « views/layer_property_setter.h ('k') | views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698