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 "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
9 #include "ui/gfx/image/image.h" | 9 #include "ui/gfx/image/image.h" |
10 #include "ui/views/controls/image_view.h" | 10 #include "ui/views/controls/image_view.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 views::View* TrayImageItem::tray_view() { | 23 views::View* TrayImageItem::tray_view() { |
24 return tray_view_; | 24 return tray_view_; |
25 } | 25 } |
26 | 26 |
27 views::View* TrayImageItem::CreateTrayView(user::LoginStatus status) { | 27 views::View* TrayImageItem::CreateTrayView(user::LoginStatus status) { |
28 CHECK(tray_view_ == NULL); | 28 CHECK(tray_view_ == NULL); |
29 tray_view_ = new TrayItemView; | 29 tray_view_ = new TrayItemView; |
30 tray_view_->CreateImageView(); | 30 tray_view_->CreateImageView(); |
31 tray_view_->image_view()->SetImage(ui::ResourceBundle::GetSharedInstance(). | 31 tray_view_->image_view()->SetImage(ui::ResourceBundle::GetSharedInstance(). |
32 GetImageNamed(resource_id_).ToSkBitmap()); | 32 GetImageNamed(resource_id_).ToImageSkia()); |
33 tray_view_->SetVisible(GetInitialVisibility()); | 33 tray_view_->SetVisible(GetInitialVisibility()); |
34 return tray_view_; | 34 return tray_view_; |
35 } | 35 } |
36 | 36 |
37 views::View* TrayImageItem::CreateDefaultView(user::LoginStatus status) { | 37 views::View* TrayImageItem::CreateDefaultView(user::LoginStatus status) { |
38 return NULL; | 38 return NULL; |
39 } | 39 } |
40 | 40 |
41 views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) { | 41 views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) { |
42 return NULL; | 42 return NULL; |
43 } | 43 } |
44 | 44 |
45 void TrayImageItem::UpdateAfterLoginStatusChange(user::LoginStatus status) { | 45 void TrayImageItem::UpdateAfterLoginStatusChange(user::LoginStatus status) { |
46 } | 46 } |
47 | 47 |
48 void TrayImageItem::DestroyTrayView() { | 48 void TrayImageItem::DestroyTrayView() { |
49 tray_view_ = NULL; | 49 tray_view_ = NULL; |
50 } | 50 } |
51 | 51 |
52 void TrayImageItem::DestroyDefaultView() { | 52 void TrayImageItem::DestroyDefaultView() { |
53 } | 53 } |
54 | 54 |
55 void TrayImageItem::DestroyDetailedView() { | 55 void TrayImageItem::DestroyDetailedView() { |
56 } | 56 } |
57 | 57 |
58 } // namespace internal | 58 } // namespace internal |
59 } // namespace ash | 59 } // namespace ash |
OLD | NEW |