| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 throbber->SetFrames( | 154 throbber->SetFrames( |
| 155 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_SPINNER)); | 155 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_SPINNER)); |
| 156 return throbber; | 156 return throbber; |
| 157 } | 157 } |
| 158 | 158 |
| 159 views::Painter* CreateBackgroundPainter() { | 159 views::Painter* CreateBackgroundPainter() { |
| 160 return new BackgroundPainter(); | 160 return new BackgroundPainter(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 gfx::Rect CalculateScreenBounds(const gfx::Size& size) { | 163 gfx::Rect CalculateScreenBounds(const gfx::Size& size) { |
| 164 gfx::Rect bounds(gfx::Screen::GetMonitorWorkAreaNearestWindow(NULL)); | 164 gfx::Rect bounds(gfx::Screen::GetMonitorAreaNearestWindow(NULL)); |
| 165 if (!size.IsEmpty()) { | 165 if (!size.IsEmpty()) { |
| 166 int horizontal_diff = bounds.width() - size.width(); | 166 int horizontal_diff = bounds.width() - size.width(); |
| 167 int vertical_diff = bounds.height() - size.height(); | 167 int vertical_diff = bounds.height() - size.height(); |
| 168 bounds.Inset(horizontal_diff / 2, vertical_diff / 2); | 168 bounds.Inset(horizontal_diff / 2, vertical_diff / 2); |
| 169 } | 169 } |
| 170 return bounds; | 170 return bounds; |
| 171 } | 171 } |
| 172 | 172 |
| 173 void CorrectLabelFontSize(views::Label* label) { | 173 void CorrectLabelFontSize(views::Label* label) { |
| 174 if (label) | 174 if (label) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 gfx::Size preferred_size = NativeTextButton::GetPreferredSize(); | 227 gfx::Size preferred_size = NativeTextButton::GetPreferredSize(); |
| 228 // Set minimal width. | 228 // Set minimal width. |
| 229 if (preferred_size.width() < kButtonMinWidth) | 229 if (preferred_size.width() < kButtonMinWidth) |
| 230 preferred_size.set_width(kButtonMinWidth); | 230 preferred_size.set_width(kButtonMinWidth); |
| 231 return preferred_size; | 231 return preferred_size; |
| 232 } | 232 } |
| 233 | 233 |
| 234 } // namespace login | 234 } // namespace login |
| 235 | 235 |
| 236 } // namespace chromeos | 236 } // namespace chromeos |
| OLD | NEW |