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 "chrome/browser/chromeos/status/network_menu_icon.h" | 5 #include "chrome/browser/chromeos/status/network_menu_icon.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 case TYPE_CELLULAR: | 824 case TYPE_CELLULAR: |
825 default: | 825 default: |
826 icon_->set_icon(GetDisconnectedImage(BARS, resource_color_theme_)); | 826 icon_->set_icon(GetDisconnectedImage(BARS, resource_color_theme_)); |
827 break; | 827 break; |
828 } | 828 } |
829 icon_->set_bottom_right_badge( | 829 icon_->set_bottom_right_badge( |
830 rb.GetImageSkiaNamed(IDR_STATUSBAR_NETWORK_DISCONNECTED)); | 830 rb.GetImageSkiaNamed(IDR_STATUSBAR_NETWORK_DISCONNECTED)); |
831 if (mode_ == MENU_MODE) | 831 if (mode_ == MENU_MODE) |
832 text_ = l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_NO_NETWORK_TOOLTIP); | 832 text_ = l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_NO_NETWORK_TOOLTIP); |
833 else | 833 else |
834 text_ = l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_NONE); | 834 text_ = l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_NONE_SELECTED); |
835 } | 835 } |
836 | 836 |
837 //////////////////////////////////////////////////////////////////////////////// | 837 //////////////////////////////////////////////////////////////////////////////// |
838 // Static functions for generating network icon images: | 838 // Static functions for generating network icon images: |
839 | 839 |
840 // This defines how we assemble a network icon. | 840 // This defines how we assemble a network icon. |
841 // Currently we iterate over all the available resolutions in |icon|. This will | 841 // Currently we iterate over all the available resolutions in |icon|. This will |
842 // be wrong once we dynamically load image resolutions. | 842 // be wrong once we dynamically load image resolutions. |
843 // TODO(pkotwicz): Figure out what to do when a new image resolution becomes | 843 // TODO(pkotwicz): Figure out what to do when a new image resolution becomes |
844 // available. | 844 // available. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 const gfx::ImageSkia NetworkMenuIcon::GetConnectedImage(ImageType type, | 937 const gfx::ImageSkia NetworkMenuIcon::GetConnectedImage(ImageType type, |
938 ResourceColorTheme color) { | 938 ResourceColorTheme color) { |
939 return GetImage(type, NumImages(type) - 1, color); | 939 return GetImage(type, NumImages(type) - 1, color); |
940 } | 940 } |
941 | 941 |
942 int NetworkMenuIcon::NumImages(ImageType type) { | 942 int NetworkMenuIcon::NumImages(ImageType type) { |
943 return (type == ARCS) ? kNumArcsImages : kNumBarsImages; | 943 return (type == ARCS) ? kNumArcsImages : kNumBarsImages; |
944 } | 944 } |
945 | 945 |
946 } // chromeos | 946 } // chromeos |
OLD | NEW |