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

Side by Side Diff: ash/system/tray/tray_empty.cc

Issue 10171021: ash: Add a shadow for the uber-tray popups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjustment Created 8 years, 7 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 | « ash/system/tray/system_tray.cc ('k') | 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/system/tray/tray_empty.h" 5 #include "ash/system/tray/tray_empty.h"
6 6
7 #include "ui/views/layout/box_layout.h" 7 #include "ui/views/layout/box_layout.h"
8 #include "ui/views/background.h"
8 #include "ui/views/view.h" 9 #include "ui/views/view.h"
9 10
11 namespace {
12
13 class EmptyBackground : public views::Background {
14 public:
15 EmptyBackground() {}
16 virtual ~EmptyBackground() {}
17
18 private:
19 virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE {
20 }
21
22 DISALLOW_COPY_AND_ASSIGN(EmptyBackground);
23 };
24
25 }
26
10 namespace ash { 27 namespace ash {
11 namespace internal { 28 namespace internal {
12 29
13 TrayEmpty::TrayEmpty() {} 30 TrayEmpty::TrayEmpty() {}
14 31
15 TrayEmpty::~TrayEmpty() {} 32 TrayEmpty::~TrayEmpty() {}
16 33
17 views::View* TrayEmpty::CreateTrayView(user::LoginStatus status) { 34 views::View* TrayEmpty::CreateTrayView(user::LoginStatus status) {
18 return NULL; 35 return NULL;
19 } 36 }
20 37
21 views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) { 38 views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) {
22 if (status == user::LOGGED_IN_NONE) 39 if (status == user::LOGGED_IN_NONE)
23 return NULL; 40 return NULL;
24 41
25 views::View* view = new views::View; 42 views::View* view = new views::View;
26 view->set_background(views::Background::CreateSolidBackground( 43 view->set_background(new EmptyBackground());
27 SkColorSetARGB(0, 0, 0, 0)));
28 view->set_border(views::Border::CreateEmptyBorder(10, 0, 0, 0)); 44 view->set_border(views::Border::CreateEmptyBorder(10, 0, 0, 0));
29 view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 45 view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
30 0, 0, 0)); 46 0, 0, 0));
47 view->SetPaintToLayer(true);
48 view->SetFillsBoundsOpaquely(false);
31 return view; 49 return view;
32 } 50 }
33 51
34 views::View* TrayEmpty::CreateDetailedView(user::LoginStatus status) { 52 views::View* TrayEmpty::CreateDetailedView(user::LoginStatus status) {
35 return NULL; 53 return NULL;
36 } 54 }
37 55
38 void TrayEmpty::DestroyTrayView() {} 56 void TrayEmpty::DestroyTrayView() {}
39 57
40 void TrayEmpty::DestroyDefaultView() {} 58 void TrayEmpty::DestroyDefaultView() {}
41 59
42 void TrayEmpty::DestroyDetailedView() {} 60 void TrayEmpty::DestroyDetailedView() {}
43 61
44 void TrayEmpty::UpdateAfterLoginStatusChange(user::LoginStatus status) {} 62 void TrayEmpty::UpdateAfterLoginStatusChange(user::LoginStatus status) {}
45 63
46 } // namespace internal 64 } // namespace internal
47 } // namespace ash 65 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698