Chromium Code Reviews| 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/passwords/manage_passwords_bubble_view.h" | 5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 823 } else if (model_.state() == password_manager::ui::CONFIRMATION_STATE) { | 823 } else if (model_.state() == password_manager::ui::CONFIRMATION_STATE) { |
| 824 AddChildView(new SaveConfirmationView(this)); | 824 AddChildView(new SaveConfirmationView(this)); |
| 825 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) { | 825 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) { |
| 826 AddChildView(new AutoSigninView(this)); | 826 AddChildView(new AutoSigninView(this)); |
| 827 } else if (model_.state() == | 827 } else if (model_.state() == |
| 828 password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) { | 828 password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) { |
| 829 AddChildView(new SignInPromoView(this)); | 829 AddChildView(new SignInPromoView(this)); |
| 830 #if defined(OS_WIN) | 830 #if defined(OS_WIN) |
| 831 } else if (model_.state() == | 831 } else if (model_.state() == |
| 832 password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) { | 832 password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) { |
| 833 AddChildView(new DesktopIOSPromotionView( | 833 AddChildView( |
|
sky
2017/02/17 00:57:23
What are the lifetimes here? You have the controll
mrefaat
2017/02/17 04:31:50
The parent view (BubbleView) owns the view. and th
sky
2017/02/17 19:06:26
How does the lifetime of the password ui controlle
mrefaat
2017/02/17 21:53:14
I think moving the controller to the model and mad
sky
2017/02/17 22:49:32
Sorry if I wasn't clear, too many models and contr
mrefaat
2017/02/18 00:03:25
Done.
| |
| 834 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE)); | 834 static_cast<DesktopIOSPromotionView*>(model_.GetDesktopIOSPromotion())); |
|
sky
2017/02/17 00:57:23
This cast indicates a problem in your design. If G
mrefaat
2017/02/17 04:31:50
Because we can't have dependency from from the con
sky
2017/02/17 19:06:26
You changed it to create the view directly, which
mrefaat
2017/02/17 21:53:14
Done that
| |
| 835 #endif | 835 #endif |
| 836 } else { | 836 } else { |
| 837 AddChildView(new ManageView(this)); | 837 AddChildView(new ManageView(this)); |
| 838 } | 838 } |
| 839 } | 839 } |
| OLD | NEW |