OLD | NEW |
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/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h" | 8 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h" |
9 #include "chrome/browser/ui/autofill/popup_constants.h" | 9 #include "chrome/browser/ui/autofill/popup_constants.h" |
10 #include "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_view_state.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // Draw border and background. | 244 // Draw border and background. |
245 views::View::OnPaint(canvas); | 245 views::View::OnPaint(canvas); |
246 | 246 |
247 // Divider line needs to be drawn after OnPaint() otherwise the background | 247 // Divider line needs to be drawn after OnPaint() otherwise the background |
248 // will overwrite the divider. | 248 // will overwrite the divider. |
249 if (password_view_) | 249 if (password_view_) |
250 canvas->FillRect(divider_bounds_, kDividerColor); | 250 canvas->FillRect(divider_bounds_, kDividerColor); |
251 } | 251 } |
252 | 252 |
253 void PasswordGenerationPopupViewViews::StyledLabelLinkClicked( | 253 void PasswordGenerationPopupViewViews::StyledLabelLinkClicked( |
254 const gfx::Range& range, int event_flags) { | 254 views::StyledLabel& label, |
| 255 const gfx::Range& range, |
| 256 int event_flags) { |
255 controller_->OnSavedPasswordsLinkClicked(); | 257 controller_->OnSavedPasswordsLinkClicked(); |
256 } | 258 } |
257 | 259 |
258 bool PasswordGenerationPopupViewViews::IsPointInPasswordBounds( | 260 bool PasswordGenerationPopupViewViews::IsPointInPasswordBounds( |
259 const gfx::Point& point) { | 261 const gfx::Point& point) { |
260 if (password_view_) | 262 if (password_view_) |
261 return password_view_->bounds().Contains(point); | 263 return password_view_->bounds().Contains(point); |
262 return false; | 264 return false; |
263 } | 265 } |
264 | 266 |
(...skipping 11 matching lines...) Expand all Loading... |
276 return new PasswordGenerationPopupViewViews(controller, observing_widget); | 278 return new PasswordGenerationPopupViewViews(controller, observing_widget); |
277 } | 279 } |
278 | 280 |
279 void PasswordGenerationPopupViewViews::GetAccessibleState( | 281 void PasswordGenerationPopupViewViews::GetAccessibleState( |
280 ui::AXViewState* state) { | 282 ui::AXViewState* state) { |
281 state->name = controller_->SuggestedText(); | 283 state->name = controller_->SuggestedText(); |
282 state->role = ui::AX_ROLE_MENU_ITEM; | 284 state->role = ui::AX_ROLE_MENU_ITEM; |
283 } | 285 } |
284 | 286 |
285 } // namespace autofill | 287 } // namespace autofill |
OLD | NEW |