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

Unified Diff: ash/common/system/tray/tray_image_item.cc

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « ash/common/system/tray/tray_image_item.h ('k') | ash/common/system/tray/tray_item_more.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_image_item.cc
diff --git a/ash/common/system/tray/tray_image_item.cc b/ash/common/system/tray/tray_image_item.cc
deleted file mode 100644
index da63db59b6e9e2b59756ba136ab20409e50e50fe..0000000000000000000000000000000000000000
--- a/ash/common/system/tray/tray_image_item.cc
+++ /dev/null
@@ -1,78 +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/tray/tray_image_item.h"
-
-#include "ash/common/shelf/wm_shelf_util.h"
-#include "ash/common/system/tray/system_tray.h"
-#include "ash/common/system/tray/tray_constants.h"
-#include "ash/common/system/tray/tray_item_view.h"
-#include "ash/common/system/tray/tray_utils.h"
-#include "ash/resources/vector_icons/vector_icons.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/paint_vector_icon.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/layout/box_layout.h"
-
-namespace ash {
-
-TrayImageItem::TrayImageItem(SystemTray* system_tray,
- const gfx::VectorIcon& icon,
- UmaType uma_type)
- : SystemTrayItem(system_tray, uma_type),
- icon_(icon),
- icon_color_(kTrayIconColor),
- tray_view_(nullptr) {}
-
-TrayImageItem::~TrayImageItem() {}
-
-views::View* TrayImageItem::tray_view() {
- return tray_view_;
-}
-
-views::View* TrayImageItem::CreateTrayView(LoginStatus status) {
- CHECK(!tray_view_);
- tray_view_ = new TrayItemView(this);
- tray_view_->CreateImageView();
- UpdateImageOnImageView();
- tray_view_->SetVisible(GetInitialVisibility());
- return tray_view_;
-}
-
-views::View* TrayImageItem::CreateDefaultView(LoginStatus status) {
- return nullptr;
-}
-
-views::View* TrayImageItem::CreateDetailedView(LoginStatus status) {
- return nullptr;
-}
-
-void TrayImageItem::UpdateAfterLoginStatusChange(LoginStatus status) {}
-
-void TrayImageItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
- SetTrayImageItemBorder(tray_view_, alignment);
-}
-
-void TrayImageItem::DestroyTrayView() {
- tray_view_ = nullptr;
-}
-
-void TrayImageItem::DestroyDefaultView() {}
-
-void TrayImageItem::DestroyDetailedView() {}
-
-void TrayImageItem::SetIconColor(SkColor color) {
- icon_color_ = color;
- UpdateImageOnImageView();
-}
-
-void TrayImageItem::UpdateImageOnImageView() {
- if (!tray_view_)
- return;
-
- tray_view_->image_view()->SetImage(
- gfx::CreateVectorIcon(icon_, kTrayIconSize, icon_color_));
-}
-
-} // namespace ash
« no previous file with comments | « ash/common/system/tray/tray_image_item.h ('k') | ash/common/system/tray/tray_item_more.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698