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

Side by Side Diff: chrome/browser/ui/cocoa/tab_dialogs_cocoa.mm

Issue 2632123003: Revert of MacViews: Allow the toolkit-views Enterprise Signin Confirmation Dialog to be used (Closed)
Patch Set: Created 3 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/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"
11 #import "chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_dialog_coc oa.h" 11 #import "chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_dialog_coc oa.h"
12 #include "chrome/browser/ui/cocoa/tab_dialogs_views_mac.h" 12 #include "chrome/browser/ui/cocoa/tab_dialogs_views_mac.h"
13 #import "chrome/browser/ui/cocoa/validation_message_bubble_cocoa.h" 13 #import "chrome/browser/ui/cocoa/validation_message_bubble_cocoa.h"
14 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
15 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
16 #include "ui/base/material_design/material_design_controller.h" 15 #include "ui/base/material_design/material_design_controller.h"
17 16
18 // static 17 // static
19 void TabDialogs::CreateForWebContents(content::WebContents* contents) { 18 void TabDialogs::CreateForWebContents(content::WebContents* contents) {
20 DCHECK(contents); 19 DCHECK(contents);
21 20
22 if (!FromWebContents(contents)) { 21 if (!FromWebContents(contents)) {
23 TabDialogs* tab_dialogs = 22 TabDialogs* tab_dialogs =
24 ui::MaterialDesignController::IsSecondaryUiMaterial() 23 ui::MaterialDesignController::IsSecondaryUiMaterial()
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 57 }
59 58
60 void TabDialogsCocoa::HideHungRendererDialog() { 59 void TabDialogsCocoa::HideHungRendererDialog() {
61 [HungRendererController endForWebContents:web_contents_]; 60 [HungRendererController endForWebContents:web_contents_];
62 } 61 }
63 62
64 void TabDialogsCocoa::ShowProfileSigninConfirmation( 63 void TabDialogsCocoa::ShowProfileSigninConfirmation(
65 Browser* browser, 64 Browser* browser,
66 Profile* profile, 65 Profile* profile,
67 const std::string& username, 66 const std::string& username,
68 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate) { 67 ui::ProfileSigninConfirmationDelegate* delegate) {
69 ProfileSigninConfirmationDialogCocoa::Show(browser, web_contents_, profile, 68 ProfileSigninConfirmationDialogCocoa::Show(
70 username, std::move(delegate)); 69 browser, web_contents_, profile, username, delegate);
71 } 70 }
72 71
73 void TabDialogsCocoa::ShowManagePasswordsBubble(bool user_action) { 72 void TabDialogsCocoa::ShowManagePasswordsBubble(bool user_action) {
74 ManagePasswordsBubbleCocoa::Show(web_contents_, user_action); 73 ManagePasswordsBubbleCocoa::Show(web_contents_, user_action);
75 } 74 }
76 75
77 void TabDialogsCocoa::HideManagePasswordsBubble() { 76 void TabDialogsCocoa::HideManagePasswordsBubble() {
78 // The bubble is closed when it loses the focus. 77 // The bubble is closed when it loses the focus.
79 } 78 }
80 79
81 base::WeakPtr<ValidationMessageBubble> TabDialogsCocoa::ShowValidationMessage( 80 base::WeakPtr<ValidationMessageBubble> TabDialogsCocoa::ShowValidationMessage(
82 const gfx::Rect& anchor_in_root_view, 81 const gfx::Rect& anchor_in_root_view,
83 const base::string16& main_text, 82 const base::string16& main_text,
84 const base::string16& sub_text) { 83 const base::string16& sub_text) {
85 return (new ValidationMessageBubbleCocoa( 84 return (new ValidationMessageBubbleCocoa(
86 web_contents_, anchor_in_root_view, main_text, sub_text))->AsWeakPtr(); 85 web_contents_, anchor_in_root_view, main_text, sub_text))->AsWeakPtr();
87 } 86 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_dialogs_cocoa.h ('k') | chrome/browser/ui/cocoa/tab_dialogs_views_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698