| 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/network/tray_network.h" | 5 #include "ash/system/network/tray_network.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
| 10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
| 11 #include "ash/system/tray/tray_constants.h" | 11 #include "ash/system/tray/tray_constants.h" |
| 12 #include "ash/system/tray/tray_item_more.h" | 12 #include "ash/system/tray/tray_item_more.h" |
| 13 #include "ash/system/tray/tray_item_view.h" |
| 13 #include "ash/system/tray/tray_views.h" | 14 #include "ash/system/tray/tray_views.h" |
| 14 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 15 #include "grit/ash_strings.h" | 16 #include "grit/ash_strings.h" |
| 16 #include "grit/ui_resources.h" | 17 #include "grit/ui_resources.h" |
| 17 #include "third_party/skia/include/core/SkColor.h" | 18 #include "third_party/skia/include/core/SkColor.h" |
| 18 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
| 19 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
| 20 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
| 21 #include "ui/gfx/font.h" | 22 #include "ui/gfx/font.h" |
| 22 #include "ui/gfx/image/image.h" | 23 #include "ui/gfx/image/image.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 namespace ash { | 92 namespace ash { |
| 92 namespace internal { | 93 namespace internal { |
| 93 | 94 |
| 94 namespace tray { | 95 namespace tray { |
| 95 | 96 |
| 96 enum ColorTheme { | 97 enum ColorTheme { |
| 97 LIGHT, | 98 LIGHT, |
| 98 DARK, | 99 DARK, |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 class NetworkTrayView : public views::View { | 102 class NetworkTrayView : public TrayItemView { |
| 102 public: | 103 public: |
| 103 NetworkTrayView(ColorTheme size, bool tray_icon) | 104 NetworkTrayView(ColorTheme size, bool tray_icon) |
| 104 : color_theme_(size), tray_icon_(tray_icon) { | 105 : color_theme_(size), tray_icon_(tray_icon) { |
| 105 SetLayoutManager(new views::FillLayout()); | 106 SetLayoutManager(new views::FillLayout()); |
| 106 | 107 |
| 107 image_view_ = color_theme_ == DARK ? | 108 image_view_ = color_theme_ == DARK ? |
| 108 new FixedSizedImageView(0, kTrayPopupItemHeight) : | 109 new FixedSizedImageView(0, kTrayPopupItemHeight) : |
| 109 new views::ImageView; | 110 new views::ImageView; |
| 110 AddChildView(image_view_); | 111 AddChildView(image_view_); |
| 111 | 112 |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 if (tray_.get()) | 525 if (tray_.get()) |
| 525 tray_->Update(info); | 526 tray_->Update(info); |
| 526 if (default_.get()) | 527 if (default_.get()) |
| 527 default_->Update(); | 528 default_->Update(); |
| 528 if (detailed_.get()) | 529 if (detailed_.get()) |
| 529 detailed_->Update(); | 530 detailed_->Update(); |
| 530 } | 531 } |
| 531 | 532 |
| 532 } // namespace internal | 533 } // namespace internal |
| 533 } // namespace ash | 534 } // namespace ash |
| OLD | NEW |