Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: chrome/browser/chromeos/login/helper.cc

Issue 10437006: Converts ui/views/controls, ui/views/examples, ui/base/models to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 23 matching lines...) Expand all
34 34
35 const char kAccountRecoveryHelpUrl[] = 35 const char kAccountRecoveryHelpUrl[] =
36 "https://www.google.com/support/accounts/bin/answer.py?answer=48598"; 36 "https://www.google.com/support/accounts/bin/answer.py?answer=48598";
37 37
38 } // namespace 38 } // namespace
39 39
40 views::SmoothedThrobber* CreateDefaultSmoothedThrobber() { 40 views::SmoothedThrobber* CreateDefaultSmoothedThrobber() {
41 views::SmoothedThrobber* throbber = 41 views::SmoothedThrobber* throbber =
42 new views::SmoothedThrobber(kThrobberFrameMs); 42 new views::SmoothedThrobber(kThrobberFrameMs);
43 throbber->SetFrames( 43 throbber->SetFrames(
44 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_SPINNER)); 44 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(IDR_SPINNER));
45 throbber->set_start_delay_ms(kThrobberStartDelayMs); 45 throbber->set_start_delay_ms(kThrobberStartDelayMs);
46 return throbber; 46 return throbber;
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().GetImageSkiaNamed(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::GetPrimaryMonitor().bounds()); 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 }
(...skipping 29 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698