| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/password_generation_bubble_view.h" | 5 #include "chrome/browser/ui/views/password_generation_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/password_manager/password_manager.h" | 8 #include "chrome/browser/password_manager/password_manager.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 gfx::Size TextfieldWrapper::GetImageSize() const { | 112 gfx::Size TextfieldWrapper::GetImageSize() const { |
| 113 // The image is sized so that it fills the space between the borders | 113 // The image is sized so that it fills the space between the borders |
| 114 // completely. | 114 // completely. |
| 115 int size = (textfield_->GetPreferredSize().height() + | 115 int size = (textfield_->GetPreferredSize().height() + |
| 116 (kTextfieldVerticalPadding - kWrapperBorderSize) * 2); | 116 (kTextfieldVerticalPadding - kWrapperBorderSize) * 2); |
| 117 return gfx::Size(size, size); | 117 return gfx::Size(size, size); |
| 118 } | 118 } |
| 119 } // namespace | 119 } // namespace |
| 120 | 120 |
| 121 PasswordGenerationBubbleView::PasswordGenerationBubbleView( | 121 PasswordGenerationBubbleView::PasswordGenerationBubbleView( |
| 122 const content::PasswordForm& form, | 122 const autofill::PasswordForm& form, |
| 123 const gfx::Rect& anchor_rect, | 123 const gfx::Rect& anchor_rect, |
| 124 views::View* anchor_view, | 124 views::View* anchor_view, |
| 125 content::RenderViewHost* render_view_host, | 125 content::RenderViewHost* render_view_host, |
| 126 PasswordManager* password_manager, | 126 PasswordManager* password_manager, |
| 127 autofill::PasswordGenerator* password_generator, | 127 autofill::PasswordGenerator* password_generator, |
| 128 content::PageNavigator* navigator, | 128 content::PageNavigator* navigator, |
| 129 ui::ThemeProvider* theme_provider) | 129 ui::ThemeProvider* theme_provider) |
| 130 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), | 130 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), |
| 131 title_label_(NULL), | 131 title_label_(NULL), |
| 132 accept_button_(NULL), | 132 accept_button_(NULL), |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 return false; | 242 return false; |
| 243 } | 243 } |
| 244 | 244 |
| 245 views::View* PasswordGenerationBubbleView::GetInitiallyFocusedView() { | 245 views::View* PasswordGenerationBubbleView::GetInitiallyFocusedView() { |
| 246 return textfield_; | 246 return textfield_; |
| 247 } | 247 } |
| 248 | 248 |
| 249 void PasswordGenerationBubbleView::WindowClosing() { | 249 void PasswordGenerationBubbleView::WindowClosing() { |
| 250 autofill::password_generation::LogUserActions(actions_); | 250 autofill::password_generation::LogUserActions(actions_); |
| 251 } | 251 } |
| OLD | NEW |