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

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

Issue 10872098: Change system level background from red to black. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/workspace/system_background_controller.h" 5 #include "ash/wm/workspace/system_background_controller.h"
6 6
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "ui/aura/root_window.h" 8 #include "ui/aura/root_window.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 controller_ = NULL; 47 controller_ = NULL;
48 GetWidget()->Close(); 48 GetWidget()->Close();
49 } 49 }
50 50
51 views::View* SystemBackgroundController::View::GetContentsView() { 51 views::View* SystemBackgroundController::View::GetContentsView() {
52 return this; 52 return this;
53 } 53 }
54 54
55 void SystemBackgroundController::View::OnPaint(gfx::Canvas* canvas) { 55 void SystemBackgroundController::View::OnPaint(gfx::Canvas* canvas) {
56 // TODO: get image! 56 // TODO: get image!
57 canvas->DrawColor(SK_ColorRED); 57 canvas->DrawColor(SK_ColorBLACK);
58 } 58 }
59 59
60 SystemBackgroundController::SystemBackgroundController(aura::RootWindow* root) 60 SystemBackgroundController::SystemBackgroundController(aura::RootWindow* root)
61 : ALLOW_THIS_IN_INITIALIZER_LIST(view_(new View(this))) { 61 : ALLOW_THIS_IN_INITIALIZER_LIST(view_(new View(this))) {
62 views::Widget* widget = new views::Widget; 62 views::Widget* widget = new views::Widget;
63 views::Widget::InitParams params( 63 views::Widget::InitParams params(
64 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 64 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
65 params.delegate = view_; 65 params.delegate = view_;
66 params.parent = root->GetChildById(kShellWindowId_SystemBackgroundContainer); 66 params.parent = root->GetChildById(kShellWindowId_SystemBackgroundContainer);
67 widget->Init(params); 67 widget->Init(params);
68 widget->SetBounds(params.parent->bounds()); 68 widget->SetBounds(params.parent->bounds());
69 widget->Show(); 69 widget->Show();
70 widget->GetNativeView()->SetName("SystemBackground"); 70 widget->GetNativeView()->SetName("SystemBackground");
71 } 71 }
72 72
73 SystemBackgroundController::~SystemBackgroundController() { 73 SystemBackgroundController::~SystemBackgroundController() {
74 if (view_) 74 if (view_)
75 view_->Close(); 75 view_->Close();
76 } 76 }
77 77
78 } // namespace internal 78 } // namespace internal
79 } // namespace ash 79 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698