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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_reset_bubble_view.cc

Issue 371633002: LabelButton: cache the last computed preferred size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/profiles/profile_reset_bubble_view.h" 5 #include "chrome/browser/ui/views/profiles/profile_reset_bubble_view.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/profile_resetter/profile_reset_global_error.h" 8 #include "chrome/browser/profile_resetter/profile_reset_global_error.h"
9 #include "chrome/browser/profile_resetter/resettable_settings_snapshot.h" 9 #include "chrome/browser/profile_resetter/resettable_settings_snapshot.h"
10 #include "chrome/browser/ui/global_error/global_error_service.h" 10 #include "chrome/browser/ui/global_error/global_error_service.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 controls_.reset_button = new views::LabelButton( 236 controls_.reset_button = new views::LabelButton(
237 this, l10n_util::GetStringUTF16(reset_button_string_id)); 237 this, l10n_util::GetStringUTF16(reset_button_string_id));
238 controls_.reset_button->SetStyle(views::Button::STYLE_BUTTON); 238 controls_.reset_button->SetStyle(views::Button::STYLE_BUTTON);
239 controls_.reset_button->SetIsDefault(true); 239 controls_.reset_button->SetIsDefault(true);
240 controls_.reset_button->SetFontList( 240 controls_.reset_button->SetFontList(
241 rb.GetFontList(ui::ResourceBundle::BoldFont)); 241 rb.GetFontList(ui::ResourceBundle::BoldFont));
242 controls_.reset_button->SetEnabled(!resetting_); 242 controls_.reset_button->SetEnabled(!resetting_);
243 // For the Resetting... text to fit. 243 // For the Resetting... text to fit.
244 gfx::Size reset_button_size = controls_.reset_button->GetPreferredSize(); 244 gfx::Size reset_button_size = controls_.reset_button->GetPreferredSize();
245 reset_button_size.set_width(100); 245 reset_button_size.set_width(100);
246 controls_.reset_button->set_min_size(reset_button_size); 246 controls_.reset_button->SetMinSize(reset_button_size);
247 247
248 // No thanks button. 248 // No thanks button.
249 controls_.no_thanks_button = new views::LabelButton( 249 controls_.no_thanks_button = new views::LabelButton(
250 this, l10n_util::GetStringUTF16(IDS_NO_THANKS)); 250 this, l10n_util::GetStringUTF16(IDS_NO_THANKS));
251 controls_.no_thanks_button->SetStyle(views::Button::STYLE_BUTTON); 251 controls_.no_thanks_button->SetStyle(views::Button::STYLE_BUTTON);
252 controls_.no_thanks_button->SetEnabled(!resetting_); 252 controls_.no_thanks_button->SetEnabled(!resetting_);
253 253
254 // Checkbox for reporting settings or not. 254 // Checkbox for reporting settings or not.
255 controls_.report_settings_checkbox = new views::Checkbox( 255 controls_.report_settings_checkbox = new views::Checkbox(
256 l10n_util::GetStringUTF16(IDS_REPORT_BUBBLE_TEXT)); 256 l10n_util::GetStringUTF16(IDS_REPORT_BUBBLE_TEXT));
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 437
438 bool IsProfileResetBubbleSupported() { 438 bool IsProfileResetBubbleSupported() {
439 return true; 439 return true;
440 } 440 }
441 441
442 GlobalErrorBubbleViewBase* ShowProfileResetBubble( 442 GlobalErrorBubbleViewBase* ShowProfileResetBubble(
443 const base::WeakPtr<ProfileResetGlobalError>& global_error, 443 const base::WeakPtr<ProfileResetGlobalError>& global_error,
444 Browser* browser) { 444 Browser* browser) {
445 return ProfileResetBubbleView::ShowBubble(global_error, browser); 445 return ProfileResetBubbleView::ShowBubble(global_error, browser);
446 } 446 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.cc ('k') | chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698