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/login/helper.h" | 5 #include "chrome/browser/chromeos/login/helper.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/cros/network_library.h" | 9 #include "chrome/browser/chromeos/cros/network_library.h" |
10 #include "chrome/browser/google/google_util.h" | 10 #include "chrome/browser/google/google_util.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 views::Throbber* CreateDefaultThrobber() { | 49 views::Throbber* CreateDefaultThrobber() { |
50 views::Throbber* throbber = new views::Throbber(kThrobberFrameMs, false); | 50 views::Throbber* throbber = new views::Throbber(kThrobberFrameMs, false); |
51 throbber->SetFrames( | 51 throbber->SetFrames( |
52 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_SPINNER)); | 52 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_SPINNER)); |
53 return throbber; | 53 return throbber; |
54 } | 54 } |
55 | 55 |
56 gfx::Rect CalculateScreenBounds(const gfx::Size& size) { | 56 gfx::Rect CalculateScreenBounds(const gfx::Size& size) { |
57 gfx::Rect bounds(gfx::Screen::GetMonitorAreaNearestWindow(NULL)); | 57 gfx::Rect bounds(gfx::Screen::GetPrimaryMonitor().bounds()); |
58 if (!size.IsEmpty()) { | 58 if (!size.IsEmpty()) { |
59 int horizontal_diff = bounds.width() - size.width(); | 59 int horizontal_diff = bounds.width() - size.width(); |
60 int vertical_diff = bounds.height() - size.height(); | 60 int vertical_diff = bounds.height() - size.height(); |
61 bounds.Inset(horizontal_diff / 2, vertical_diff / 2); | 61 bounds.Inset(horizontal_diff / 2, vertical_diff / 2); |
62 } | 62 } |
63 return bounds; | 63 return bounds; |
64 } | 64 } |
65 | 65 |
66 void CorrectLabelFontSize(views::Label* label) { | 66 void CorrectLabelFontSize(views::Label* label) { |
67 if (label) | 67 if (label) |
(...skipping 24 matching lines...) Expand all Loading... |
92 } else if (network_library->wifi_connecting()) { | 92 } else if (network_library->wifi_connecting()) { |
93 return UTF8ToUTF16(network_library->wifi_network()->name()); | 93 return UTF8ToUTF16(network_library->wifi_network()->name()); |
94 } else if (network_library->cellular_connecting()) { | 94 } else if (network_library->cellular_connecting()) { |
95 return UTF8ToUTF16(network_library->cellular_network()->name()); | 95 return UTF8ToUTF16(network_library->cellular_network()->name()); |
96 } else { | 96 } else { |
97 return string16(); | 97 return string16(); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 } // namespace chromeos | 101 } // namespace chromeos |
OLD | NEW |