| 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 "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
| 10 #include "ui/views/background.h" | 10 #include "ui/views/background.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 password_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 46 password_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 47 AddChildView(password_label_); | 47 AddChildView(password_label_); |
| 48 | 48 |
| 49 suggestion_label_ = new views::Label(suggestion, font_list); | 49 suggestion_label_ = new views::Label(suggestion, font_list); |
| 50 suggestion_label_->SetHorizontalAlignment(gfx::ALIGN_RIGHT); | 50 suggestion_label_->SetHorizontalAlignment(gfx::ALIGN_RIGHT); |
| 51 suggestion_label_->SetEnabledColor(kExplanatoryTextColor); | 51 suggestion_label_->SetEnabledColor(kExplanatoryTextColor); |
| 52 AddChildView(suggestion_label_); | 52 AddChildView(suggestion_label_); |
| 53 } | 53 } |
| 54 virtual ~PasswordRow() {} | 54 virtual ~PasswordRow() {} |
| 55 | 55 |
| 56 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE { | 56 virtual bool HitTestRect(const gfx::RectF& rect) const OVERRIDE { |
| 57 // Have parent do event handling. | 57 // Have parent do event handling. |
| 58 return false; | 58 return false; |
| 59 } | 59 } |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 // Child views. Not owned. | 62 // Child views. Not owned. |
| 63 views::Label* suggestion_label_; | 63 views::Label* suggestion_label_; |
| 64 views::Label* password_label_; | 64 views::Label* password_label_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(PasswordRow); | 66 DISALLOW_COPY_AND_ASSIGN(PasswordRow); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 // If the top level widget can't be found, cancel the popup since we can't | 180 // If the top level widget can't be found, cancel the popup since we can't |
| 181 // fully set it up. | 181 // fully set it up. |
| 182 if (!observing_widget) | 182 if (!observing_widget) |
| 183 return NULL; | 183 return NULL; |
| 184 | 184 |
| 185 return new PasswordGenerationPopupViewViews(controller, observing_widget); | 185 return new PasswordGenerationPopupViewViews(controller, observing_widget); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace autofill | 188 } // namespace autofill |
| OLD | NEW |