| OLD | NEW |
| 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_image_item.h" | 5 #include "ash/system/tray/tray_image_item.h" |
| 6 | 6 |
| 7 #include "ash/system/tray/tray_item_view.h" | 7 #include "ash/system/tray/tray_item_view.h" |
| 8 #include "ash/system/tray/tray_views.h" | 8 #include "ash/system/tray/tray_views.h" |
| 9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
| 10 #include "ui/gfx/image/image.h" | 10 #include "ui/gfx/image/image.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 views::View* TrayImageItem::CreateTrayView(user::LoginStatus status) { | 36 views::View* TrayImageItem::CreateTrayView(user::LoginStatus status) { |
| 37 CHECK(tray_view_ == NULL); | 37 CHECK(tray_view_ == NULL); |
| 38 tray_view_ = new TrayItemView; | 38 tray_view_ = new TrayItemView; |
| 39 tray_view_->CreateImageView(); | 39 tray_view_->CreateImageView(); |
| 40 tray_view_->image_view()->SetImage(ui::ResourceBundle::GetSharedInstance(). | 40 tray_view_->image_view()->SetImage(ui::ResourceBundle::GetSharedInstance(). |
| 41 GetImageNamed(resource_id_).ToImageSkia()); | 41 GetImageNamed(resource_id_).ToImageSkia()); |
| 42 tray_view_->SetVisible(GetInitialVisibility()); | 42 tray_view_->SetVisible(GetInitialVisibility()); |
| 43 return tray_view_; | 43 return tray_view_; |
| 44 } | 44 } |
| 45 | 45 |
| 46 views::View* TrayImageItem::CreateDefaultView(user::LoginStatus status) { | 46 views::View* TrayImageItem::CreateDefaultView(user::LoginStatus status, |
| 47 int bubble_width) { |
| 47 return NULL; | 48 return NULL; |
| 48 } | 49 } |
| 49 | 50 |
| 50 views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) { | 51 views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) { |
| 51 return NULL; | 52 return NULL; |
| 52 } | 53 } |
| 53 | 54 |
| 54 void TrayImageItem::UpdateAfterLoginStatusChange(user::LoginStatus status) { | 55 void TrayImageItem::UpdateAfterLoginStatusChange(user::LoginStatus status) { |
| 55 } | 56 } |
| 56 | 57 |
| 57 void TrayImageItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { | 58 void TrayImageItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
| 58 SetTrayImageItemBorder(tray_view_, alignment); | 59 SetTrayImageItemBorder(tray_view_, alignment); |
| 59 } | 60 } |
| 60 | 61 |
| 61 void TrayImageItem::DestroyTrayView() { | 62 void TrayImageItem::DestroyTrayView() { |
| 62 tray_view_ = NULL; | 63 tray_view_ = NULL; |
| 63 } | 64 } |
| 64 | 65 |
| 65 void TrayImageItem::DestroyDefaultView() { | 66 void TrayImageItem::DestroyDefaultView() { |
| 66 } | 67 } |
| 67 | 68 |
| 68 void TrayImageItem::DestroyDetailedView() { | 69 void TrayImageItem::DestroyDetailedView() { |
| 69 } | 70 } |
| 70 | 71 |
| 71 } // namespace internal | 72 } // namespace internal |
| 72 } // namespace ash | 73 } // namespace ash |
| OLD | NEW |