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

Side by Side Diff: ash/system/tray/tray_image_item.cc

Issue 9753019: ash: Add a bluetooth entry in the uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/tray_image_item.h ('k') | ash/system/tray/tray_item_more.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/base/resource/resource_bundle.h" 7 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/gfx/image/image.h" 8 #include "ui/gfx/image/image.h"
9 #include "ui/views/controls/image_view.h" 9 #include "ui/views/controls/image_view.h"
10 10
11 namespace ash { 11 namespace ash {
12 namespace internal { 12 namespace internal {
13 13
14 TrayImageItem::TrayImageItem(int resource_id) 14 TrayImageItem::TrayImageItem(int resource_id)
15 : resource_id_(resource_id) { 15 : resource_id_(resource_id) {
16 } 16 }
17 17
18 TrayImageItem::~TrayImageItem() {} 18 TrayImageItem::~TrayImageItem() {}
19 19
20 views::View* TrayImageItem::CreateTrayView(user::LoginStatus status) { 20 views::View* TrayImageItem::CreateTrayView(user::LoginStatus status) {
21 image_view_.reset(new views::ImageView); 21 image_view_.reset(new views::ImageView);
22 image_view_->SetImage(ui::ResourceBundle::GetSharedInstance(). 22 image_view_->SetImage(ui::ResourceBundle::GetSharedInstance().
23 GetImageNamed(resource_id_).ToSkBitmap()); 23 GetImageNamed(resource_id_).ToSkBitmap());
24 image_view_->SetVisible(ShouldDisplay()); 24 image_view_->SetVisible(GetInitialVisibility());
25 return image_view_.get(); 25 return image_view_.get();
26 } 26 }
27 27
28 views::View* TrayImageItem::CreateDefaultView(user::LoginStatus status) { 28 views::View* TrayImageItem::CreateDefaultView(user::LoginStatus status) {
29 return NULL; 29 return NULL;
30 } 30 }
31 31
32 views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) { 32 views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) {
33 return NULL; 33 return NULL;
34 } 34 }
35 35
36 void TrayImageItem::DestroyTrayView() { 36 void TrayImageItem::DestroyTrayView() {
37 image_view_.reset(); 37 image_view_.reset();
38 } 38 }
39 39
40 void TrayImageItem::DestroyDefaultView() { 40 void TrayImageItem::DestroyDefaultView() {
41 } 41 }
42 42
43 void TrayImageItem::DestroyDetailedView() { 43 void TrayImageItem::DestroyDetailedView() {
44 } 44 }
45 45
46 } // namespace internal 46 } // namespace internal
47 } // namespace ash 47 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_image_item.h ('k') | ash/system/tray/tray_item_more.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698