diff options
Diffstat (limited to 'views/layer_property_setter.cc')
-rw-r--r-- | views/layer_property_setter.cc | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/views/layer_property_setter.cc b/views/layer_property_setter.cc new file mode 100644 index 0000000..26f203f --- /dev/null +++ b/views/layer_property_setter.cc @@ -0,0 +1,59 @@ +// Copyright (c) 2011 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 "views/layer_property_setter.h" + +#include "base/memory/scoped_ptr.h" +#include "ui/gfx/compositor/compositor.h" +#include "ui/gfx/compositor/layer.h" + +namespace views { + +namespace { + +// DefaultSetter --------------------------------------------------------------- + +class DefaultSetter : public LayerPropertySetter { + public: + DefaultSetter(); + + // LayerPropertySetter: + virtual void Installed(ui::Layer* layer) OVERRIDE; + virtual void Uninstalled(ui::Layer* layer) OVERRIDE; + virtual void SetTransform(ui::Layer* layer, + const ui::Transform& transform) OVERRIDE; + virtual void SetBounds(ui::Layer* layer, const gfx::Rect& bounds) OVERRIDE; + + private: + DISALLOW_COPY_AND_ASSIGN(DefaultSetter); +}; + +DefaultSetter::DefaultSetter() { +} + +void DefaultSetter::Installed(ui::Layer* layer) { +} + +void DefaultSetter::Uninstalled(ui::Layer* layer) { +} + +void DefaultSetter::SetTransform(ui::Layer* layer, + const ui::Transform& transform) { + layer->SetTransform(transform); +} + +void DefaultSetter::SetBounds(ui::Layer* layer, const gfx::Rect& bounds) { + layer->SetBounds(bounds); +} + +} // namespace + +// LayerPropertySetter --------------------------------------------------------- + +// static +LayerPropertySetter* LayerPropertySetter::CreateDefaultSetter() { + return new DefaultSetter; +} + +} // namespace views |