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

Unified Diff: ash/common/system/chromeos/enterprise/tray_enterprise.cc

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 10 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
Index: ash/common/system/chromeos/enterprise/tray_enterprise.cc
diff --git a/ash/common/system/chromeos/enterprise/tray_enterprise.cc b/ash/common/system/chromeos/enterprise/tray_enterprise.cc
deleted file mode 100644
index 26f48caba17854093ab419d6b6cd83ee555fdcab..0000000000000000000000000000000000000000
--- a/ash/common/system/chromeos/enterprise/tray_enterprise.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/common/system/chromeos/enterprise/tray_enterprise.h"
-
-#include "ash/common/login_status.h"
-#include "ash/common/system/tray/label_tray_view.h"
-#include "ash/common/system/tray/system_tray_delegate.h"
-#include "ash/common/system/tray/system_tray_notifier.h"
-#include "ash/common/wm_shell.h"
-#include "ash/resources/grit/ash_resources.h"
-#include "base/logging.h"
-#include "base/strings/string16.h"
-
-namespace ash {
-
-TrayEnterprise::TrayEnterprise(SystemTray* system_tray)
- : SystemTrayItem(system_tray, UMA_ENTERPRISE), tray_view_(nullptr) {
- WmShell::Get()->system_tray_notifier()->AddEnterpriseDomainObserver(this);
-}
-
-TrayEnterprise::~TrayEnterprise() {
- WmShell::Get()->system_tray_notifier()->RemoveEnterpriseDomainObserver(this);
-}
-
-void TrayEnterprise::UpdateEnterpriseMessage() {
- base::string16 message =
- WmShell::Get()->system_tray_delegate()->GetEnterpriseMessage();
- if (tray_view_)
- tray_view_->SetMessage(message);
-}
-
-views::View* TrayEnterprise::CreateDefaultView(LoginStatus status) {
- CHECK(tray_view_ == NULL);
- // For public accounts, enterprise ownership is indicated in the user details
- // instead.
- if (status == LoginStatus::PUBLIC)
- return NULL;
- tray_view_ = new LabelTrayView(this, IDR_AURA_UBER_TRAY_ENTERPRISE);
- UpdateEnterpriseMessage();
- return tray_view_;
-}
-
-void TrayEnterprise::DestroyDefaultView() {
- tray_view_ = NULL;
-}
-
-void TrayEnterprise::OnEnterpriseDomainChanged() {
- UpdateEnterpriseMessage();
-}
-
-void TrayEnterprise::OnViewClicked(views::View* sender) {
- WmShell::Get()->system_tray_delegate()->ShowEnterpriseInfo();
-}
-
-} // namespace ash
« no previous file with comments | « ash/common/system/chromeos/enterprise/tray_enterprise.h ('k') | ash/common/system/chromeos/ime_menu/ime_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698