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/timer/timer.h" | 7 #include "base/timer/timer.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 // Tracks the state of the browser window. | 293 // Tracks the state of the browser window. |
294 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; | 294 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; |
295 void OnWidgetClosing(views::Widget* widget) override; | 295 void OnWidgetClosing(views::Widget* widget) override; |
296 | 296 |
297 void OnTimer(); | 297 void OnTimer(); |
298 static base::TimeDelta GetTimeout() { | 298 static base::TimeDelta GetTimeout() { |
299 return base::TimeDelta::FromSeconds( | 299 return base::TimeDelta::FromSeconds( |
300 ManagePasswordsBubbleView::auto_signin_toast_timeout_); | 300 ManagePasswordsBubbleView::auto_signin_toast_timeout_); |
301 } | 301 } |
302 | 302 |
303 base::OneShotTimer<AutoSigninView> timer_; | 303 base::OneShotTimer timer_; |
304 ManagePasswordsBubbleView* parent_; | 304 ManagePasswordsBubbleView* parent_; |
305 ScopedObserver<views::Widget, views::WidgetObserver> observed_browser_; | 305 ScopedObserver<views::Widget, views::WidgetObserver> observed_browser_; |
306 | 306 |
307 DISALLOW_COPY_AND_ASSIGN(AutoSigninView); | 307 DISALLOW_COPY_AND_ASSIGN(AutoSigninView); |
308 }; | 308 }; |
309 | 309 |
310 ManagePasswordsBubbleView::AutoSigninView::AutoSigninView( | 310 ManagePasswordsBubbleView::AutoSigninView::AutoSigninView( |
311 ManagePasswordsBubbleView* parent) | 311 ManagePasswordsBubbleView* parent) |
312 : parent_(parent), | 312 : parent_(parent), |
313 observed_browser_(this) { | 313 observed_browser_(this) { |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 } else if (model()->state() == | 958 } else if (model()->state() == |
959 password_manager::ui::CREDENTIAL_REQUEST_STATE) { | 959 password_manager::ui::CREDENTIAL_REQUEST_STATE) { |
960 AddChildView(new AccountChooserView(this)); | 960 AddChildView(new AccountChooserView(this)); |
961 } else if (model()->state() == password_manager::ui::AUTO_SIGNIN_STATE) { | 961 } else if (model()->state() == password_manager::ui::AUTO_SIGNIN_STATE) { |
962 AddChildView(new AutoSigninView(this)); | 962 AddChildView(new AutoSigninView(this)); |
963 } else { | 963 } else { |
964 AddChildView(new ManageView(this)); | 964 AddChildView(new ManageView(this)); |
965 } | 965 } |
966 GetLayoutManager()->Layout(this); | 966 GetLayoutManager()->Layout(this); |
967 } | 967 } |
OLD | NEW |