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

Unified Diff: ash/wm/power_button_controller.cc

Issue 9289036: aura: Add Layer::LAYER_SOLID_COLOR to compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update WorkspaceManagerTest Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/power_button_controller.h ('k') | ash/wm/shadow_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/power_button_controller.cc
diff --git a/ash/wm/power_button_controller.cc b/ash/wm/power_button_controller.cc
index 47d0aa47c276544bbf77cdda4c8292ece2cada83..c05c90e27e21daaeb3f089b638d46cbf5b211b35 100644
--- a/ash/wm/power_button_controller.cc
+++ b/ash/wm/power_button_controller.cc
@@ -301,22 +301,6 @@ bool PowerButtonController::TestApi::BackgroundLayerIsVisible() const {
controller_->background_layer_->visible();
}
-// Simple class that fills |background_layer_| with black.
-class PowerButtonController::BackgroundLayerDelegate
- : public ui::LayerDelegate {
- public:
- BackgroundLayerDelegate() {}
- virtual ~BackgroundLayerDelegate() {}
-
- // ui::LayerDelegate implementation:
- virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
- canvas->FillRect(SK_ColorBLACK, aura::RootWindow::GetInstance()->bounds());
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BackgroundLayerDelegate);
-};
-
PowerButtonController::PowerButtonController()
: logged_in_as_non_guest_(false),
locked_(false),
@@ -521,9 +505,8 @@ void PowerButtonController::ShowBackgroundLayer() {
hide_background_layer_timer_.Stop();
if (!background_layer_.get()) {
- background_layer_delegate_.reset(new BackgroundLayerDelegate);
- background_layer_.reset(new ui::Layer(ui::Layer::LAYER_HAS_TEXTURE));
- background_layer_->set_delegate(background_layer_delegate_.get());
+ background_layer_.reset(new ui::Layer(ui::Layer::LAYER_SOLID_COLOR));
+ background_layer_->SetColor(SK_ColorBLACK);
ui::Layer* root_layer = aura::RootWindow::GetInstance()->layer();
background_layer_->SetBounds(root_layer->bounds());
« no previous file with comments | « ash/wm/power_button_controller.h ('k') | ash/wm/shadow_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698