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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view.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
« no previous file with comments | « chrome/browser/ui/views/autofill/decorated_textfield.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
index ae570bb2f2e2d2281843c7cb3df626fd2ac57c79..9ec81abf5b4ce3ba8c362f8d8a2b9a98558443f8 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
@@ -26,6 +26,7 @@
#include "components/user_prefs/user_prefs.h"
#include "ui/accessibility/ax_view_state.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/events/event.h"
#include "ui/views/background.h"
#include "ui/views/controls/button/md_text_button.h"
@@ -436,7 +437,9 @@ GURL BookmarkEditorView::GetInputURL() const {
void BookmarkEditorView::UserInputChanged() {
if (details_.GetNodeType() != BookmarkNode::FOLDER) {
const GURL url(GetInputURL());
- if (!url.is_valid())
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial())
+ url_tf_->SetInvalid(!url.is_valid());
+ else if (!url.is_valid())
url_tf_->SetBackgroundColor(kErrorColor);
else
url_tf_->UseDefaultBackgroundColor();
« no previous file with comments | « chrome/browser/ui/views/autofill/decorated_textfield.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698