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

Unified Diff: chrome/browser/ui/views/autofill/decorated_textfield.cc

Issue 2406363003: Update appearance of invalid textfields in Harmony. (Closed)
Patch Set: combine install with setcolorid Created 4 years, 2 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
Index: chrome/browser/ui/views/autofill/decorated_textfield.cc
diff --git a/chrome/browser/ui/views/autofill/decorated_textfield.cc b/chrome/browser/ui/views/autofill/decorated_textfield.cc
deleted file mode 100644
index 377b73c08cd9154adc0136e7a0bb716806c70959..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/autofill/decorated_textfield.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/autofill/decorated_textfield.h"
-
-#include <utility>
-
-#include "chrome/browser/ui/views/autofill/tooltip_icon.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/color_palette.h"
-#include "ui/views/background.h"
-#include "ui/views/controls/button/label_button.h"
-#include "ui/views/controls/focusable_border.h"
-#include "ui/views/controls/textfield/textfield_controller.h"
-#include "ui/views/view_targeter.h"
-
-namespace autofill {
-
-// static
-const char DecoratedTextfield::kViewClassName[] = "autofill/DecoratedTextfield";
-
-DecoratedTextfield::DecoratedTextfield(
- const base::string16& default_value,
- const base::string16& placeholder,
- views::TextfieldController* controller)
- : invalid_(false) {
- UpdateBorder();
-
- set_placeholder_text(placeholder);
- SetText(default_value);
- set_controller(controller);
-}
-
-DecoratedTextfield::~DecoratedTextfield() {}
-
-void DecoratedTextfield::SetInvalid(bool invalid) {
- if (invalid_ == invalid)
- return;
-
- invalid_ = invalid;
- UpdateBorder();
- SchedulePaint();
-}
-
-const char* DecoratedTextfield::GetClassName() const {
- return kViewClassName;
-}
-
-void DecoratedTextfield::UpdateBorder() {
- std::unique_ptr<views::FocusableBorder> border(new views::FocusableBorder());
- if (invalid_)
- border->SetColor(gfx::kGoogleRed700);
-
- SetBorder(std::move(border));
-}
-
-} // namespace autofill
« no previous file with comments | « chrome/browser/ui/views/autofill/decorated_textfield.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698