diff options
author | dalecurtis <dalecurtis@chromium.org> | 2015-10-23 14:16:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-23 21:17:26 +0000 |
commit | ccb7824284975a271967334f86b4fc7a17378de5 (patch) | |
tree | ea8519490d80fedc4df07bba10367f96b6d52f02 /ash | |
parent | 3ff45329620a583c186ce4204cc5d5dc343ed378 (diff) | |
download | chromium_src-ccb7824284975a271967334f86b4fc7a17378de5.zip chromium_src-ccb7824284975a271967334f86b4fc7a17378de5.tar.gz chromium_src-ccb7824284975a271967334f86b4fc7a17378de5.tar.bz2 |
Revert of Add dimming to the background during sign in (patchset #4 id:160001 of https://codereview.chromium.org/1400153002/ )
Reason for revert:
https://code.google.com/p/chromium/issues/detail?id=547178
Original issue's description:
> Add dimming to the background during sign in
>
> * Add option to put the dim layer at the bottom. Login screen put this dim layer at the bottom of login container containers so that
> dim layer stays during login transition.
>
> BUG=478438
> TEST=ScreenDimmer.DimAtBottom
>
> Committed: https://crrev.com/c527600749bfc6970ba39e4ed6b24404b0f7b256
> Cr-Commit-Position: refs/heads/master@{#355481}
TBR=dzhioev@chromium.org,alemate@chromium.org,oshima@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=478438
Review URL: https://codereview.chromium.org/1424513003
Cr-Commit-Position: refs/heads/master@{#355885}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/screen_dimmer.cc | 9 | ||||
-rw-r--r-- | ash/wm/screen_dimmer.h | 3 | ||||
-rw-r--r-- | ash/wm/screen_dimmer_unittest.cc | 27 |
3 files changed, 2 insertions, 37 deletions
diff --git a/ash/wm/screen_dimmer.cc b/ash/wm/screen_dimmer.cc index 559faaf..6c74888 100644 --- a/ash/wm/screen_dimmer.cc +++ b/ash/wm/screen_dimmer.cc @@ -53,10 +53,7 @@ ScreenDimmer* ScreenDimmer::GetForRoot() { } ScreenDimmer::ScreenDimmer(int container_id) - : container_id_(container_id), - target_opacity_(0.5f), - is_dimming_(false), - at_bottom_(false) { + : container_id_(container_id), target_opacity_(0.5f), is_dimming_(false) { Shell::GetInstance()->AddShellObserver(this); } @@ -96,10 +93,6 @@ void ScreenDimmer::Update(bool should_dim) { dim = new DimWindow(container); dim->SetDimOpacity(target_opacity_); } - if (at_bottom_) - dim->parent()->StackChildAtBottom(dim); - else - dim->parent()->StackChildAtTop(dim); dim->Show(); } else { if (dim) { diff --git a/ash/wm/screen_dimmer.h b/ash/wm/screen_dimmer.h index 9d8779e..6d26e68 100644 --- a/ash/wm/screen_dimmer.h +++ b/ash/wm/screen_dimmer.h @@ -41,8 +41,6 @@ class ASH_EXPORT ScreenDimmer : ShellObserver { // Dim or undim the layers. void SetDimming(bool should_dim); - void set_at_bottom(bool at_bottom) { at_bottom_ = at_bottom; } - bool is_dimming() const { return is_dimming_; } // Find a ScreenDimmer in the container, or nullptr if it does not exist. @@ -65,7 +63,6 @@ class ASH_EXPORT ScreenDimmer : ShellObserver { // Are we currently dimming the screen? bool is_dimming_; - bool at_bottom_; DISALLOW_COPY_AND_ASSIGN(ScreenDimmer); }; diff --git a/ash/wm/screen_dimmer_unittest.cc b/ash/wm/screen_dimmer_unittest.cc index 084105e..9b1bdc6 100644 --- a/ash/wm/screen_dimmer_unittest.cc +++ b/ash/wm/screen_dimmer_unittest.cc @@ -10,8 +10,7 @@ #include "ash/wm/dim_window.h" #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -//#include "ui/aura/window_event_dispatcher.h" -#include "ui/aura/test/test_windows.h" +#include "ui/aura/window_event_dispatcher.h" #include "ui/compositor/layer.h" namespace ash { @@ -87,29 +86,5 @@ TEST_F(ScreenDimmerTest, RootDimmer) { EXPECT_EQ(nullptr, ScreenDimmer::FindForTest(-1)); } -TEST_F(ScreenDimmerTest, DimAtBottom) { - ScreenDimmer* root_dimmer = ScreenDimmer::GetForRoot(); - aura::Window* root_window = Shell::GetPrimaryRootWindow(); - scoped_ptr<aura::Window> window( - aura::test::CreateTestWindowWithId(1, root_window)); - root_dimmer->SetDimming(true); - std::vector<aura::Window*>::const_iterator dim_iter = - std::find(root_window->children().begin(), root_window->children().end(), - GetDimWindow()); - ASSERT_TRUE(dim_iter != root_window->children().end()); - // Dim layer is at top. - EXPECT_EQ(*dim_iter, *root_window->children().rbegin()); - - root_dimmer->SetDimming(false); - root_dimmer->set_at_bottom(true); - root_dimmer->SetDimming(true); - - dim_iter = std::find(root_window->children().begin(), - root_window->children().end(), GetDimWindow()); - ASSERT_TRUE(dim_iter != root_window->children().end()); - // Dom layer is at the bottom. - EXPECT_EQ(*dim_iter, *root_window->children().begin()); -} - } // namespace test } // namespace ash |