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

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

Issue 3201003: Fixed error message bubbles according to the latest mocks (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Comments resolved Created 10 years, 4 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
« no previous file with comments | « chrome/browser/chromeos/login/helper.h ('k') | chrome/browser/chromeos/login/login_screen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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"
6
5 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "chrome/browser/google_util.h"
6 #include "gfx/canvas_skia.h" 9 #include "gfx/canvas_skia.h"
10 #include "googleurl/src/gurl.h"
7 #include "grit/theme_resources.h" 11 #include "grit/theme_resources.h"
8 #include "third_party/skia/include/effects/SkGradientShader.h" 12 #include "third_party/skia/include/effects/SkGradientShader.h"
9 #include "views/controls/throbber.h" 13 #include "views/controls/throbber.h"
10 #include "views/painter.h" 14 #include "views/painter.h"
11 #include "views/screen.h" 15 #include "views/screen.h"
12 16
13 namespace chromeos { 17 namespace chromeos {
14 18
15 namespace { 19 namespace {
16 20
17 // Time in ms per throbber frame. 21 // Time in ms per throbber frame.
18 const int kThrobberFrameMs = 60; 22 const int kThrobberFrameMs = 60;
19 23
20 // Time in ms before smothed throbber is shown. 24 // Time in ms before smothed throbber is shown.
21 const int kThrobberStartDelayMs = 500; 25 const int kThrobberStartDelayMs = 500;
22 26
23 const SkColor kBackgroundCenterColor = SkColorSetRGB(41, 50, 67); 27 const SkColor kBackgroundCenterColor = SkColorSetRGB(41, 50, 67);
24 const SkColor kBackgroundEdgeColor = SK_ColorBLACK; 28 const SkColor kBackgroundEdgeColor = SK_ColorBLACK;
25 29
30 const char kAccountRecoveryHelpUrl[] =
31 "http://www.google.com/support/accounts/bin/answer.py?answer=48598";
32
26 class BackgroundPainter : public views::Painter { 33 class BackgroundPainter : public views::Painter {
27 public: 34 public:
28 BackgroundPainter() {} 35 BackgroundPainter() {}
29 36
30 virtual void Paint(int w, int h, gfx::Canvas* canvas) { 37 virtual void Paint(int w, int h, gfx::Canvas* canvas) {
31 SkRect rect; 38 SkRect rect;
32 rect.set(SkIntToScalar(0), 39 rect.set(SkIntToScalar(0),
33 SkIntToScalar(0), 40 SkIntToScalar(0),
34 SkIntToScalar(w), 41 SkIntToScalar(w),
35 SkIntToScalar(h)); 42 SkIntToScalar(h));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 gfx::Rect bounds(views::Screen::GetMonitorWorkAreaNearestWindow(NULL)); 87 gfx::Rect bounds(views::Screen::GetMonitorWorkAreaNearestWindow(NULL));
81 if (!size.IsEmpty()) { 88 if (!size.IsEmpty()) {
82 int horizontal_diff = bounds.width() - size.width(); 89 int horizontal_diff = bounds.width() - size.width();
83 int vertical_diff = bounds.height() - size.height(); 90 int vertical_diff = bounds.height() - size.height();
84 bounds.Inset(horizontal_diff / 2, vertical_diff / 2); 91 bounds.Inset(horizontal_diff / 2, vertical_diff / 2);
85 } 92 }
86 93
87 return bounds; 94 return bounds;
88 } 95 }
89 96
97 GURL GetAccountRecoveryHelpUrl() {
98 return google_util::AppendGoogleLocaleParam(GURL(kAccountRecoveryHelpUrl));
99 }
100
90 } // namespace chromeos 101 } // namespace chromeos
91 102
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/helper.h ('k') | chrome/browser/chromeos/login/login_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698