diff options
author | vollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 15:30:02 +0000 |
---|---|---|
committer | vollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 15:30:02 +0000 |
commit | a8f2115c89679dea905482d9c189c1df78cfd26f (patch) | |
tree | 4d435c102ff2ef211c3a2ac7312fe29cfe3a2794 /views/paint_lock.cc | |
parent | f714d7e35bc942e3704f9a9893834193a96e2219 (diff) | |
download | chromium_src-a8f2115c89679dea905482d9c189c1df78cfd26f.zip chromium_src-a8f2115c89679dea905482d9c189c1df78cfd26f.tar.gz chromium_src-a8f2115c89679dea905482d9c189c1df78cfd26f.tar.bz2 |
With this CL animated rotations can be triggered by visiting URLs like about:rotate?right. The about handler fires orientation events that the TouchBrowserFrameView is listening for. When notified, the TBFV either rotates itself, or the views desktop (if it is active). The animation code lives in views/animation and knows nothing about sensors.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7273073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/paint_lock.cc')
-rw-r--r-- | views/paint_lock.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/views/paint_lock.cc b/views/paint_lock.cc new file mode 100644 index 0000000..282c2c3 --- /dev/null +++ b/views/paint_lock.cc @@ -0,0 +1,19 @@ +// 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/paint_lock.h" + +#include "views/view.h" + +namespace views { + +PaintLock::PaintLock(View* view) : view_(view) { + view_->set_painting_enabled(false); +} + +PaintLock::~PaintLock() { + view_->set_painting_enabled(true); +} + +} // namespace views |