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

Side by Side Diff: ash/wm/system_background_controller.cc

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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 unified diff | Download patch
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | build/common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/system_background_controller.h" 5 #include "ash/wm/system_background_controller.h"
6 6
7 #include "ui/aura/root_window.h" 7 #include "ui/aura/root_window.h"
8 #include "ui/compositor/layer.h" 8 #include "ui/compositor/layer.h"
9 #include "ui/compositor/layer_type.h" 9 #include "ui/compositor/layer_type.h"
10 10
11 namespace ash { 11 namespace ash {
12 namespace internal { 12 namespace internal {
13 13
14 namespace {
15
16 #if defined(OS_CHROMEOS)
17 // Background color used for the Chrome OS boot splash screen.
18 const SkColor kChromeOsBootColor = SkColorSetARGB(0xff, 0xfe, 0xfe, 0xfe);
19 #endif
20
21 } // namespace
22
23 SystemBackgroundController::SystemBackgroundController( 14 SystemBackgroundController::SystemBackgroundController(
24 aura::RootWindow* root_window, 15 aura::RootWindow* root_window,
25 SkColor color) 16 SkColor color)
26 : root_window_(root_window), 17 : root_window_(root_window),
27 layer_(new ui::Layer(ui::LAYER_SOLID_COLOR)) { 18 layer_(new ui::Layer(ui::LAYER_SOLID_COLOR)) {
28 root_window_->AddObserver(this); 19 root_window_->AddObserver(this);
29 layer_->SetColor(color); 20 layer_->SetColor(color);
30 21
31 ui::Layer* root_layer = root_window_->layer(); 22 ui::Layer* root_layer = root_window_->layer();
32 layer_->SetBounds(gfx::Rect(root_layer->bounds().size())); 23 layer_->SetBounds(gfx::Rect(root_layer->bounds().size()));
(...skipping 12 matching lines...) Expand all
45 void SystemBackgroundController::OnWindowBoundsChanged( 36 void SystemBackgroundController::OnWindowBoundsChanged(
46 aura::Window* root, 37 aura::Window* root,
47 const gfx::Rect& old_bounds, 38 const gfx::Rect& old_bounds,
48 const gfx::Rect& new_bounds) { 39 const gfx::Rect& new_bounds) {
49 DCHECK_EQ(root_window_, root); 40 DCHECK_EQ(root_window_, root);
50 layer_->SetBounds(gfx::Rect(root_window_->layer()->bounds().size())); 41 layer_->SetBounds(gfx::Rect(root_window_->layer()->bounds().size()));
51 } 42 }
52 43
53 } // namespace internal 44 } // namespace internal
54 } // namespace ash 45 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698