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

Side by Side Diff: chrome/browser/ui/views/passwords/credentials_item_view.cc

Issue 2869683003: Views/Harmony: Remove references to layout constants in c/b/u/v/passwords. (Closed)
Patch Set: Review comments + other whitespace changes. Created 3 years, 7 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/passwords/credentials_item_view.h" 5 #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" 9 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
10 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" 10 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
11 #include "chrome/browser/ui/views/harmony/chrome_typography.h" 11 #include "chrome/browser/ui/views/harmony/chrome_typography.h"
12 #include "chrome/grit/generated_resources.h" 12 #include "chrome/grit/generated_resources.h"
13 #include "chrome/grit/theme_resources.h" 13 #include "chrome/grit/theme_resources.h"
14 #include "components/autofill/core/common/password_form.h" 14 #include "components/autofill/core/common/password_form.h"
15 #include "ui/base/resource/resource_bundle.h" 15 #include "ui/base/resource/resource_bundle.h"
16 #include "ui/gfx/canvas.h" 16 #include "ui/gfx/canvas.h"
17 #include "ui/gfx/path.h" 17 #include "ui/gfx/path.h"
18 #include "ui/views/border.h" 18 #include "ui/views/border.h"
19 #include "ui/views/bubble/tooltip_icon.h" 19 #include "ui/views/bubble/tooltip_icon.h"
20 #include "ui/views/controls/image_view.h" 20 #include "ui/views/controls/image_view.h"
21 #include "ui/views/controls/label.h" 21 #include "ui/views/controls/label.h"
22 #include "ui/views/layout/layout_constants.h"
23 22
24 namespace { 23 namespace {
25 24
26 gfx::Size GetTextLabelsSize(const views::Label* upper_label, 25 gfx::Size GetTextLabelsSize(const views::Label* upper_label,
27 const views::Label* lower_label) { 26 const views::Label* lower_label) {
28 gfx::Size upper_label_size = upper_label ? upper_label->GetPreferredSize() 27 gfx::Size upper_label_size = upper_label ? upper_label->GetPreferredSize()
29 : gfx::Size(); 28 : gfx::Size();
30 gfx::Size lower_label_size = lower_label ? lower_label->GetPreferredSize() 29 gfx::Size lower_label_size = lower_label ? lower_label->GetPreferredSize()
31 : gfx::Size(); 30 : gfx::Size();
32 return gfx::Size(std::max(upper_label_size.width(), lower_label_size.width()), 31 return gfx::Size(std::max(upper_label_size.width(), lower_label_size.width()),
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 child_area.CenterPoint().y() - info_icon_->height() / 2)); 194 child_area.CenterPoint().y() - info_icon_->height() / 2));
196 } 195 }
197 } 196 }
198 197
199 void CredentialsItemView::OnPaint(gfx::Canvas* canvas) { 198 void CredentialsItemView::OnPaint(gfx::Canvas* canvas) {
200 if (state() == STATE_PRESSED || state() == STATE_HOVERED) 199 if (state() == STATE_PRESSED || state() == STATE_HOVERED)
201 canvas->DrawColor(hover_color_); 200 canvas->DrawColor(hover_color_);
202 201
203 CustomButton::OnPaint(canvas); 202 CustomButton::OnPaint(canvas);
204 } 203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698