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

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

Issue 867323005: MacViews: Fix duplicate definition of ValidationMessageBubble::ShowAndCreate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FirstResponder
Patch Set: Created 5 years, 11 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 "chrome/browser/ui/views/collected_cookies_views.h" 7 #include "chrome/browser/ui/views/collected_cookies_views.h"
8 #include "chrome/browser/ui/views/hung_renderer_view.h" 8 #include "chrome/browser/ui/views/hung_renderer_view.h"
9 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" 9 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h"
10 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views. h" 10 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views. h"
11 #include "chrome/browser/ui/views/validation_message_bubble_view.h"
11 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
12 13
13 // static 14 // static
14 void TabDialogs::CreateForWebContents(content::WebContents* contents) { 15 void TabDialogs::CreateForWebContents(content::WebContents* contents) {
15 DCHECK(contents); 16 DCHECK(contents);
16 if (!FromWebContents(contents)) 17 if (!FromWebContents(contents))
17 contents->SetUserData(UserDataKey(), new TabDialogsViews(contents)); 18 contents->SetUserData(UserDataKey(), new TabDialogsViews(contents));
18 } 19 }
19 20
20 TabDialogsViews::TabDialogsViews(content::WebContents* contents) 21 TabDialogsViews::TabDialogsViews(content::WebContents* contents)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 60 }
60 61
61 void TabDialogsViews::HideManagePasswordsBubble() { 62 void TabDialogsViews::HideManagePasswordsBubble() {
62 if (!ManagePasswordsBubbleView::IsShowing()) 63 if (!ManagePasswordsBubbleView::IsShowing())
63 return; 64 return;
64 content::WebContents* bubble_web_contents = 65 content::WebContents* bubble_web_contents =
65 ManagePasswordsBubbleView::manage_password_bubble()->web_contents(); 66 ManagePasswordsBubbleView::manage_password_bubble()->web_contents();
66 if (web_contents_ == bubble_web_contents) 67 if (web_contents_ == bubble_web_contents)
67 ManagePasswordsBubbleView::CloseBubble(); 68 ManagePasswordsBubbleView::CloseBubble();
68 } 69 }
70
71 scoped_ptr<ValidationMessageBubble> TabDialogsViews::ShowValidationMessage(
72 const gfx::Rect& anchor_in_root_view,
73 const base::string16& main_text,
74 const base::string16& sub_text) {
75 return make_scoped_ptr(new ValidationMessageBubbleView(
76 web_contents_, anchor_in_root_view, main_text, sub_text));
77 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_dialogs_views.h ('k') | chrome/browser/ui/views/validation_message_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698