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 "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 8 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
8 #include "chrome/browser/ui/views/collected_cookies_views.h" | 9 #include "chrome/browser/ui/views/collected_cookies_views.h" |
9 #include "chrome/browser/ui/views/hung_renderer_view.h" | 10 #include "chrome/browser/ui/views/hung_renderer_view.h" |
10 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 11 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
11 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.
h" | 12 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.
h" |
12 #include "chrome/browser/ui/views/validation_message_bubble_view.h" | 13 #include "chrome/browser/ui/views/validation_message_bubble_view.h" |
13 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
14 | 15 |
15 // static | 16 // static |
16 void TabDialogs::CreateForWebContents(content::WebContents* contents) { | 17 void TabDialogs::CreateForWebContents(content::WebContents* contents) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 67 |
67 void TabDialogsViews::HideManagePasswordsBubble() { | 68 void TabDialogsViews::HideManagePasswordsBubble() { |
68 if (!ManagePasswordsBubbleView::manage_password_bubble()) | 69 if (!ManagePasswordsBubbleView::manage_password_bubble()) |
69 return; | 70 return; |
70 content::WebContents* bubble_web_contents = | 71 content::WebContents* bubble_web_contents = |
71 ManagePasswordsBubbleView::manage_password_bubble()->web_contents(); | 72 ManagePasswordsBubbleView::manage_password_bubble()->web_contents(); |
72 if (web_contents_ == bubble_web_contents) | 73 if (web_contents_ == bubble_web_contents) |
73 ManagePasswordsBubbleView::CloseCurrentBubble(); | 74 ManagePasswordsBubbleView::CloseCurrentBubble(); |
74 } | 75 } |
75 | 76 |
76 scoped_ptr<ValidationMessageBubble> TabDialogsViews::ShowValidationMessage( | 77 std::unique_ptr<ValidationMessageBubble> TabDialogsViews::ShowValidationMessage( |
77 const gfx::Rect& anchor_in_root_view, | 78 const gfx::Rect& anchor_in_root_view, |
78 const base::string16& main_text, | 79 const base::string16& main_text, |
79 const base::string16& sub_text) { | 80 const base::string16& sub_text) { |
80 return make_scoped_ptr(new ValidationMessageBubbleView( | 81 return base::WrapUnique(new ValidationMessageBubbleView( |
81 web_contents_, anchor_in_root_view, main_text, sub_text)); | 82 web_contents_, anchor_in_root_view, main_text, sub_text)); |
82 } | 83 } |
OLD | NEW |