| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/views/profile_reset_bubble_view.h" | 5 #include "chrome/browser/ui/views/profile_reset_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/google/google_util.h" | 10 #include "chrome/browser/google/google_util.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 controls_.report_settings_checkbox = new views::Checkbox( | 253 controls_.report_settings_checkbox = new views::Checkbox( |
| 254 l10n_util::GetStringUTF16(IDS_REPORT_BUBBLE_TEXT)); | 254 l10n_util::GetStringUTF16(IDS_REPORT_BUBBLE_TEXT)); |
| 255 controls_.report_settings_checkbox->SetTextColor( | 255 controls_.report_settings_checkbox->SetTextColor( |
| 256 views::Button::STATE_NORMAL, SK_ColorGRAY); | 256 views::Button::STATE_NORMAL, SK_ColorGRAY); |
| 257 controls_.report_settings_checkbox->SetChecked(report_checked); | 257 controls_.report_settings_checkbox->SetChecked(report_checked); |
| 258 controls_.report_settings_checkbox->SetTextMultiLine(true); | 258 controls_.report_settings_checkbox->SetTextMultiLine(true); |
| 259 controls_.report_settings_checkbox->set_background( | 259 controls_.report_settings_checkbox->set_background( |
| 260 views::Background::CreateSolidBackground(kLightGrayBackgroundColor)); | 260 views::Background::CreateSolidBackground(kLightGrayBackgroundColor)); |
| 261 // Have a smaller margin on the right, to have the |controls_.help_button| | 261 // Have a smaller margin on the right, to have the |controls_.help_button| |
| 262 // closer to the edge. | 262 // closer to the edge. |
| 263 controls_.report_settings_checkbox->set_border( | 263 controls_.report_settings_checkbox->SetBorder( |
| 264 views::Border::CreateSolidSidedBorder( | 264 views::Border::CreateSolidSidedBorder(kMarginWidth, |
| 265 kMarginWidth, kMarginWidth, kMarginWidth, kMarginWidth / 2, | 265 kMarginWidth, |
| 266 kLightGrayBackgroundColor)); | 266 kMarginWidth, |
| 267 kMarginWidth / 2, |
| 268 kLightGrayBackgroundColor)); |
| 267 | 269 |
| 268 // Help button to toggle the bottom panel on or off. | 270 // Help button to toggle the bottom panel on or off. |
| 269 controls_.help_button = new views::ImageButton(this); | 271 controls_.help_button = new views::ImageButton(this); |
| 270 const gfx::ImageSkia* help_image = rb.GetImageSkiaNamed(IDR_QUESTION_MARK); | 272 const gfx::ImageSkia* help_image = rb.GetImageSkiaNamed(IDR_QUESTION_MARK); |
| 271 color_utils::HSL hsl_shift = { -1, 0, 0.8 }; | 273 color_utils::HSL hsl_shift = { -1, 0, 0.8 }; |
| 272 brighter_help_image_ = gfx::ImageSkiaOperations::CreateHSLShiftedImage( | 274 brighter_help_image_ = gfx::ImageSkiaOperations::CreateHSLShiftedImage( |
| 273 *help_image, hsl_shift); | 275 *help_image, hsl_shift); |
| 274 controls_.help_button->SetImage( | 276 controls_.help_button->SetImage( |
| 275 views::Button::STATE_NORMAL, &brighter_help_image_); | 277 views::Button::STATE_NORMAL, &brighter_help_image_); |
| 276 controls_.help_button->SetImage(views::Button::STATE_HOVERED, help_image); | 278 controls_.help_button->SetImage(views::Button::STATE_HOVERED, help_image); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 431 |
| 430 bool IsProfileResetBubbleSupported() { | 432 bool IsProfileResetBubbleSupported() { |
| 431 return true; | 433 return true; |
| 432 } | 434 } |
| 433 | 435 |
| 434 GlobalErrorBubbleViewBase* ShowProfileResetBubble( | 436 GlobalErrorBubbleViewBase* ShowProfileResetBubble( |
| 435 const base::WeakPtr<ProfileResetGlobalError>& global_error, | 437 const base::WeakPtr<ProfileResetGlobalError>& global_error, |
| 436 Browser* browser) { | 438 Browser* browser) { |
| 437 return ProfileResetBubbleView::ShowBubble(global_error, browser); | 439 return ProfileResetBubbleView::ShowBubble(global_error, browser); |
| 438 } | 440 } |
| OLD | NEW |