| 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/tab_dialogs_views.h" | 5 #include "chrome/browser/ui/views/tab_dialogs_views.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 8 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
| 9 #include "chrome/browser/ui/views/collected_cookies_views.h" | 9 #include "chrome/browser/ui/views/collected_cookies_views.h" |
| 10 #include "chrome/browser/ui/views/hung_renderer_view.h" | 10 #include "chrome/browser/ui/views/hung_renderer_view.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 void TabDialogsViews::HideHungRendererDialog() { | 48 void TabDialogsViews::HideHungRendererDialog() { |
| 49 HungRendererDialogView::Hide(web_contents_); | 49 HungRendererDialogView::Hide(web_contents_); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void TabDialogsViews::ShowProfileSigninConfirmation( | 52 void TabDialogsViews::ShowProfileSigninConfirmation( |
| 53 Browser* browser, | 53 Browser* browser, |
| 54 Profile* profile, | 54 Profile* profile, |
| 55 const std::string& username, | 55 const std::string& username, |
| 56 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate) { | 56 ui::ProfileSigninConfirmationDelegate* delegate) { |
| 57 #if !defined(OS_CHROMEOS) | 57 #if !defined(OS_CHROMEOS) |
| 58 ProfileSigninConfirmationDialogViews::ShowDialog(browser, profile, username, | 58 ProfileSigninConfirmationDialogViews::ShowDialog( |
| 59 std::move(delegate)); | 59 browser, profile, username, delegate); |
| 60 #else | 60 #else |
| 61 NOTREACHED(); | 61 NOTREACHED(); |
| 62 #endif | 62 #endif |
| 63 } | 63 } |
| 64 | 64 |
| 65 void TabDialogsViews::ShowManagePasswordsBubble(bool user_action) { | 65 void TabDialogsViews::ShowManagePasswordsBubble(bool user_action) { |
| 66 if (ManagePasswordsBubbleView::manage_password_bubble()) { | 66 if (ManagePasswordsBubbleView::manage_password_bubble()) { |
| 67 // The bubble is currently shown for some other tab. We should close it now | 67 // The bubble is currently shown for some other tab. We should close it now |
| 68 // and open for |web_contents_|. | 68 // and open for |web_contents_|. |
| 69 ManagePasswordsBubbleView::CloseCurrentBubble(); | 69 ManagePasswordsBubbleView::CloseCurrentBubble(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 82 ManagePasswordsBubbleView::CloseCurrentBubble(); | 82 ManagePasswordsBubbleView::CloseCurrentBubble(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 base::WeakPtr<ValidationMessageBubble> TabDialogsViews::ShowValidationMessage( | 85 base::WeakPtr<ValidationMessageBubble> TabDialogsViews::ShowValidationMessage( |
| 86 const gfx::Rect& anchor_in_root_view, | 86 const gfx::Rect& anchor_in_root_view, |
| 87 const base::string16& main_text, | 87 const base::string16& main_text, |
| 88 const base::string16& sub_text) { | 88 const base::string16& sub_text) { |
| 89 return (new ValidationMessageBubbleView( | 89 return (new ValidationMessageBubbleView( |
| 90 web_contents_, anchor_in_root_view, main_text, sub_text))->AsWeakPtr(); | 90 web_contents_, anchor_in_root_view, main_text, sub_text))->AsWeakPtr(); |
| 91 } | 91 } |
| OLD | NEW |