Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chrome/browser/ui/views/tab_dialogs_views.cc

Issue 1880853002: Convert ValidationMessageBubbleView to BubbleDialogDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msw review Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 void TabDialogsViews::HideManagePasswordsBubble() { 68 void TabDialogsViews::HideManagePasswordsBubble() {
69 if (!ManagePasswordsBubbleView::manage_password_bubble()) 69 if (!ManagePasswordsBubbleView::manage_password_bubble())
70 return; 70 return;
71 content::WebContents* bubble_web_contents = 71 content::WebContents* bubble_web_contents =
72 ManagePasswordsBubbleView::manage_password_bubble()->web_contents(); 72 ManagePasswordsBubbleView::manage_password_bubble()->web_contents();
73 if (web_contents_ == bubble_web_contents) 73 if (web_contents_ == bubble_web_contents)
74 ManagePasswordsBubbleView::CloseCurrentBubble(); 74 ManagePasswordsBubbleView::CloseCurrentBubble();
75 } 75 }
76 76
77 std::unique_ptr<ValidationMessageBubble> TabDialogsViews::ShowValidationMessage( 77 base::WeakPtr<ValidationMessageBubble> TabDialogsViews::ShowValidationMessage(
78 const gfx::Rect& anchor_in_root_view, 78 const gfx::Rect& anchor_in_root_view,
79 const base::string16& main_text, 79 const base::string16& main_text,
80 const base::string16& sub_text) { 80 const base::string16& sub_text) {
81 return base::WrapUnique(new ValidationMessageBubbleView( 81 return (new ValidationMessageBubbleView(
82 web_contents_, anchor_in_root_view, main_text, sub_text)); 82 web_contents_, anchor_in_root_view, main_text, sub_text))->AsWeakPtr();
83 } 83 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_dialogs_views.h ('k') | chrome/browser/ui/views/validation_message_bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698