| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profile_chooser_view.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/profiles/profile_info_util.h" | 9 #include "chrome/browser/profiles/profile_info_util.h" |
| 10 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 set_border(NULL); | 243 set_border(NULL); |
| 244 | 244 |
| 245 if (!is_editing_allowed) | 245 if (!is_editing_allowed) |
| 246 return; | 246 return; |
| 247 | 247 |
| 248 SetIcon(*rb->GetImageSkiaNamed(IDR_INFOBAR_AUTOFILL)); | 248 SetIcon(*rb->GetImageSkiaNamed(IDR_INFOBAR_AUTOFILL)); |
| 249 set_icon_placement(views::TextButton::ICON_ON_RIGHT); | 249 set_icon_placement(views::TextButton::ICON_ON_RIGHT); |
| 250 | 250 |
| 251 // Textfield that overlaps the button. | 251 // Textfield that overlaps the button. |
| 252 profile_name_textfield_ = new views::Textfield(); | 252 profile_name_textfield_ = new views::Textfield(); |
| 253 profile_name_textfield_->SetController(controller); | 253 profile_name_textfield_->set_controller(controller); |
| 254 profile_name_textfield_->SetFontList(medium_font_list); | 254 profile_name_textfield_->SetFontList(medium_font_list); |
| 255 profile_name_textfield_->SetVisible(false); | 255 profile_name_textfield_->SetVisible(false); |
| 256 AddChildView(profile_name_textfield_); | 256 AddChildView(profile_name_textfield_); |
| 257 } | 257 } |
| 258 | 258 |
| 259 views::Textfield* profile_name_textfield() { | 259 views::Textfield* profile_name_textfield() { |
| 260 return profile_name_textfield_; | 260 return profile_name_textfield_; |
| 261 } | 261 } |
| 262 | 262 |
| 263 // Hide the editable textfield and show the button displaying the profile | 263 // Hide the editable textfield and show the button displaying the profile |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 email_button->set_menu_marker( | 834 email_button->set_menu_marker( |
| 835 rb->GetImageNamed(IDR_CLOSE_1).ToImageSkia()); | 835 rb->GetImageNamed(IDR_CLOSE_1).ToImageSkia()); |
| 836 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 836 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
| 837 } | 837 } |
| 838 layout->StartRow(1, 0); | 838 layout->StartRow(1, 0); |
| 839 layout->AddView(email_button); | 839 layout->AddView(email_button); |
| 840 | 840 |
| 841 // Save the original email address, as the button text could be elided. | 841 // Save the original email address, as the button text could be elided. |
| 842 current_profile_accounts_map_[email_button] = account; | 842 current_profile_accounts_map_[email_button] = account; |
| 843 } | 843 } |
| OLD | NEW |