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

Unified Diff: chrome/browser/ui/views/password_generation_bubble_view.cc

Issue 10659022: Revert 144071 - Add a regenerate button to regenerate the password in Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/password_generation_bubble_view.h ('k') | rlz/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/password_generation_bubble_view.cc
===================================================================
--- chrome/browser/ui/views/password_generation_bubble_view.cc (revision 144073)
+++ chrome/browser/ui/views/password_generation_bubble_view.cc (working copy)
@@ -15,10 +15,7 @@
#include "content/public/browser/render_view_host.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
-#include "grit/theme_resources_standard.h"
-#include "ui/base/theme_provider.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/text_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/link.h"
@@ -36,19 +33,16 @@
content::RenderViewHost* render_view_host,
autofill::PasswordGenerator* password_generator,
content::PageNavigator* navigator,
- PasswordManager* password_manager,
- ui::ThemeProvider* theme_provider)
+ PasswordManager* password_manager)
: BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT),
accept_button_(NULL),
- regenerate_button_(NULL),
text_field_(NULL),
anchor_rect_(anchor_rect),
form_(form),
render_view_host_(render_view_host),
password_generator_(password_generator),
navigator_(navigator),
- password_manager_(password_manager),
- theme_provider_(theme_provider) {}
+ password_manager_(password_manager) {}
PasswordGenerationBubbleView::~PasswordGenerationBubbleView() {}
@@ -58,15 +52,6 @@
accept_button_ = new views::NativeTextButton(this,
ASCIIToUTF16("Try It"));
- regenerate_button_ = new views::ImageButton(this);
- regenerate_button_->SetImage(views::CustomButton::BS_NORMAL,
- theme_provider_->GetImageSkiaNamed(IDR_RELOAD));
- regenerate_button_->SetImage(views::CustomButton::BS_HOT,
- theme_provider_->GetImageSkiaNamed(IDR_RELOAD_H));
- regenerate_button_->SetImage(views::CustomButton::BS_PUSHED,
- theme_provider_->GetImageSkiaNamed(IDR_RELOAD_P));
- regenerate_button_->SetTooltipText(ASCIIToUTF16("Regenerate"));
-
text_field_ = new views::Textfield();
text_field_->SetText(
ASCIIToUTF16(password_generator_->Generate()));
@@ -94,8 +79,6 @@
cs = layout->AddColumnSet(1);
cs->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 100);
- cs->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0, GridLayout::FIXED,
- regenerate_button_->GetPreferredSize().width(), 100);
cs->AddPaddingColumn(1, views::kRelatedControlHorizontalSpacing);
cs->AddColumn(GridLayout::TRAILING, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
@@ -106,7 +89,6 @@
layout->StartRow(0, 1);
layout->AddView(text_field_);
- layout->AddView(regenerate_button_);
layout->AddView(accept_button_);
}
@@ -121,9 +103,6 @@
render_view_host_->GetRoutingID(), text_field_->text()));
password_manager_->SetFormHasGeneratedPassword(form_);
StartFade(false);
- } else if (sender == regenerate_button_) {
- text_field_->SetText(
- ASCIIToUTF16(password_generator_->Generate()));
}
}
« no previous file with comments | « chrome/browser/ui/views/password_generation_bubble_view.h ('k') | rlz/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698