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/cocoa/tab_dialogs_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/tab_dialogs_cocoa.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" | 8 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" |
9 #import "chrome/browser/ui/cocoa/hung_renderer_controller.h" | 9 #import "chrome/browser/ui/cocoa/hung_renderer_controller.h" |
10 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.h" | 10 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate) { | 68 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate) { |
69 ProfileSigninConfirmationDialogCocoa::Show(browser, web_contents_, profile, | 69 ProfileSigninConfirmationDialogCocoa::Show(browser, web_contents_, profile, |
70 username, std::move(delegate)); | 70 username, std::move(delegate)); |
71 } | 71 } |
72 | 72 |
73 void TabDialogsCocoa::ShowManagePasswordsBubble(bool user_action) { | 73 void TabDialogsCocoa::ShowManagePasswordsBubble(bool user_action) { |
74 ManagePasswordsBubbleCocoa::Show(web_contents_, user_action); | 74 ManagePasswordsBubbleCocoa::Show(web_contents_, user_action); |
75 } | 75 } |
76 | 76 |
77 void TabDialogsCocoa::HideManagePasswordsBubble() { | 77 void TabDialogsCocoa::HideManagePasswordsBubble() { |
78 // The bubble is closed when it loses the focus. | 78 // Close toolkit-views bubble. |
79 // In Cocoa code path the bubble is closed when it loses the focus. | |
80 ManagePasswordsBubbleCocoa::CloseCurrentBubble(); | |
tapted
2017/04/19 03:31:06
I think we can call ManagePasswordsBubbleView::Clo
varkha
2017/04/19 08:34:16
Done (and same for the ShowManagePasswordsBubble -
| |
79 } | 81 } |
80 | 82 |
81 base::WeakPtr<ValidationMessageBubble> TabDialogsCocoa::ShowValidationMessage( | 83 base::WeakPtr<ValidationMessageBubble> TabDialogsCocoa::ShowValidationMessage( |
82 const gfx::Rect& anchor_in_root_view, | 84 const gfx::Rect& anchor_in_root_view, |
83 const base::string16& main_text, | 85 const base::string16& main_text, |
84 const base::string16& sub_text) { | 86 const base::string16& sub_text) { |
85 return (new ValidationMessageBubbleCocoa( | 87 return (new ValidationMessageBubbleCocoa( |
86 web_contents_, anchor_in_root_view, main_text, sub_text))->AsWeakPtr(); | 88 web_contents_, anchor_in_root_view, main_text, sub_text))->AsWeakPtr(); |
87 } | 89 } |
OLD | NEW |