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

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

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the COUNT value from the SystemMenuDefaultViewRows enum. Created 4 years, 5 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/common/system/tray/tray_empty.h ('k') | ash/common/system/tray/tray_image_item.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/common/system/tray/tray_empty.h"
6
7 #include "ui/views/background.h"
8 #include "ui/views/border.h"
9 #include "ui/views/layout/box_layout.h"
10 #include "ui/views/view.h"
11
12 namespace {
13
14 class EmptyBackground : public views::Background {
15 public:
16 EmptyBackground() {}
17 ~EmptyBackground() override {}
18
19 private:
20 void Paint(gfx::Canvas* canvas, views::View* view) const override {}
21
22 DISALLOW_COPY_AND_ASSIGN(EmptyBackground);
23 };
24 }
25
26 namespace ash {
27
28 TrayEmpty::TrayEmpty(SystemTray* system_tray) : SystemTrayItem(system_tray) {}
29
30 TrayEmpty::~TrayEmpty() {}
31
32 views::View* TrayEmpty::CreateTrayView(LoginStatus status) {
33 return NULL;
34 }
35
36 views::View* TrayEmpty::CreateDefaultView(LoginStatus status) {
37 if (status == LoginStatus::NOT_LOGGED_IN)
38 return NULL;
39
40 views::View* view = new views::View;
41 view->set_background(new EmptyBackground());
42 view->SetBorder(views::Border::CreateEmptyBorder(10, 0, 0, 0));
43 view->SetLayoutManager(
44 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
45 view->SetPaintToLayer(true);
46 view->layer()->SetFillsBoundsOpaquely(false);
47 return view;
48 }
49
50 views::View* TrayEmpty::CreateDetailedView(LoginStatus status) {
51 return NULL;
52 }
53
54 void TrayEmpty::DestroyTrayView() {}
55
56 void TrayEmpty::DestroyDefaultView() {}
57
58 void TrayEmpty::DestroyDetailedView() {}
59
60 void TrayEmpty::UpdateAfterLoginStatusChange(LoginStatus status) {}
61
62 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_empty.h ('k') | ash/common/system/tray/tray_image_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698