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

Side by Side Diff: chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc

Issue 2644903004: Move around more vector icons. (Closed)
Patch Set: fix comment Created 3 years, 10 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/autofill/password_generation_popup_view_views. h" 5 #include "chrome/browser/ui/views/autofill/password_generation_popup_view_views. h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "chrome/app/vector_icons/vector_icons.h"
9 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h" 10 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h"
10 #include "chrome/browser/ui/autofill/popup_constants.h" 11 #include "chrome/browser/ui/autofill/popup_constants.h"
11 #include "ui/accessibility/ax_node_data.h" 12 #include "ui/accessibility/ax_node_data.h"
12 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/gfx/canvas.h" 14 #include "ui/gfx/canvas.h"
14 #include "ui/gfx/color_palette.h" 15 #include "ui/gfx/color_palette.h"
15 #include "ui/gfx/paint_vector_icon.h" 16 #include "ui/gfx/paint_vector_icon.h"
16 #include "ui/gfx/vector_icons_public.h"
17 #include "ui/native_theme/native_theme.h" 17 #include "ui/native_theme/native_theme.h"
18 #include "ui/views/background.h" 18 #include "ui/views/background.h"
19 #include "ui/views/border.h" 19 #include "ui/views/border.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/controls/styled_label.h" 22 #include "ui/views/controls/styled_label.h"
23 #include "ui/views/layout/box_layout.h" 23 #include "ui/views/layout/box_layout.h"
24 #include "ui/views/widget/widget.h" 24 #include "ui/views/widget/widget.h"
25 25
26 namespace autofill { 26 namespace autofill {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const gfx::FontList& font_list) { 92 const gfx::FontList& font_list) {
93 views::BoxLayout* box_layout = new views::BoxLayout( 93 views::BoxLayout* box_layout = new views::BoxLayout(
94 views::BoxLayout::kHorizontal, 94 views::BoxLayout::kHorizontal,
95 PasswordGenerationPopupController::kHorizontalPadding, 0, 95 PasswordGenerationPopupController::kHorizontalPadding, 0,
96 PasswordGenerationPopupController::kHorizontalPadding); 96 PasswordGenerationPopupController::kHorizontalPadding);
97 box_layout->set_main_axis_alignment( 97 box_layout->set_main_axis_alignment(
98 views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); 98 views::BoxLayout::MAIN_AXIS_ALIGNMENT_START);
99 SetLayoutManager(box_layout); 99 SetLayoutManager(box_layout);
100 100
101 views::ImageView* key_image = new views::ImageView(); 101 views::ImageView* key_image = new views::ImageView();
102 key_image->SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::AUTOLOGIN, 32, 102 key_image->SetImage(
103 gfx::kChromeIconGrey)); 103 gfx::CreateVectorIcon(kAutologinIcon, 32, gfx::kChromeIconGrey));
104 AddChildView(key_image); 104 AddChildView(key_image);
105 105
106 PasswordTextBox* password_text_box = new PasswordTextBox(); 106 PasswordTextBox* password_text_box = new PasswordTextBox();
107 password_text_box->Init(suggestion, password, font_list); 107 password_text_box->Init(suggestion, password, font_list);
108 AddChildView(password_text_box); 108 AddChildView(password_text_box);
109 } 109 }
110 110
111 // views::View: 111 // views::View:
112 bool CanProcessEventsWithinSubtree() const override { 112 bool CanProcessEventsWithinSubtree() const override {
113 // Send events to the parent view for handling. 113 // Send events to the parent view for handling.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 return new PasswordGenerationPopupViewViews(controller, observing_widget); 283 return new PasswordGenerationPopupViewViews(controller, observing_widget);
284 } 284 }
285 285
286 void PasswordGenerationPopupViewViews::GetAccessibleNodeData( 286 void PasswordGenerationPopupViewViews::GetAccessibleNodeData(
287 ui::AXNodeData* node_data) { 287 ui::AXNodeData* node_data) {
288 node_data->SetName(controller_->SuggestedText()); 288 node_data->SetName(controller_->SuggestedText());
289 node_data->role = ui::AX_ROLE_MENU_ITEM; 289 node_data->role = ui::AX_ROLE_MENU_ITEM;
290 } 290 }
291 291
292 } // namespace autofill 292 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc ('k') | chrome/browser/ui/views/autofill/save_card_icon_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698