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> |
11 | 11 |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 13 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
14 #include "chrome/browser/chromeos/cros/cros_library.h" | 14 #include "chrome/browser/chromeos/cros/cros_library.h" |
15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
17 #include "grit/theme_resources_standard.h" | |
18 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
19 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
20 #include "ui/gfx/canvas.h" | 19 #include "ui/gfx/canvas.h" |
21 #include "ui/gfx/image/image_skia_source.h" | 20 #include "ui/gfx/image/image_skia_source.h" |
22 #include "ui/gfx/skbitmap_operations.h" | 21 #include "ui/gfx/skbitmap_operations.h" |
23 | 22 |
24 using std::max; | 23 using std::max; |
25 using std::min; | 24 using std::min; |
26 | 25 |
27 namespace chromeos { | 26 namespace chromeos { |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 const gfx::ImageSkia NetworkMenuIcon::GetConnectedImage(ImageType type, | 968 const gfx::ImageSkia NetworkMenuIcon::GetConnectedImage(ImageType type, |
970 ResourceColorTheme color) { | 969 ResourceColorTheme color) { |
971 return GetImage(type, NumImages(type) - 1, color); | 970 return GetImage(type, NumImages(type) - 1, color); |
972 } | 971 } |
973 | 972 |
974 int NetworkMenuIcon::NumImages(ImageType type) { | 973 int NetworkMenuIcon::NumImages(ImageType type) { |
975 return (type == ARCS) ? kNumArcsImages : kNumBarsImages; | 974 return (type == ARCS) ? kNumArcsImages : kNumBarsImages; |
976 } | 975 } |
977 | 976 |
978 } // chromeos | 977 } // chromeos |
OLD | NEW |