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

Side by Side Diff: chrome/browser/ui/javascript_dialogs/javascript_dialog_mac.cc

Issue 2458903002: Split javascript_dialogs.cc into views and cocoa+views versions. (Closed)
Patch Set: -build_config.h Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/javascript_dialogs/javascript_dialog.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/javascript_dialogs/javascript_dialog.h" 5 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog.h"
6 6
7 #include "build/build_config.h"
8 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h"
9
10 #if defined(OS_MACOSX)
11 #include "chrome/browser/ui/browser_dialogs.h" 7 #include "chrome/browser/ui/browser_dialogs.h"
12 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog_cocoa.h" 8 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog_cocoa.h"
13 #endif 9 #include "chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h"
14 10
15 JavaScriptDialog::~JavaScriptDialog() = default; 11 JavaScriptDialog::~JavaScriptDialog() = default;
16 12
17 base::WeakPtr<JavaScriptDialog> JavaScriptDialog::Create( 13 base::WeakPtr<JavaScriptDialog> JavaScriptDialog::Create(
18 content::WebContents* parent_web_contents, 14 content::WebContents* parent_web_contents,
19 content::WebContents* alerting_web_contents, 15 content::WebContents* alerting_web_contents,
20 const base::string16& title, 16 const base::string16& title,
21 content::JavaScriptMessageType message_type, 17 content::JavaScriptMessageType message_type,
22 const base::string16& message_text, 18 const base::string16& message_text,
23 const base::string16& default_prompt_text, 19 const base::string16& default_prompt_text,
24 const content::JavaScriptDialogManager::DialogClosedCallback& 20 const content::JavaScriptDialogManager::DialogClosedCallback&
25 dialog_callback) { 21 dialog_callback) {
26 #if defined(OS_MACOSX)
27 if (chrome::ToolkitViewsWebUIDialogsEnabled()) { 22 if (chrome::ToolkitViewsWebUIDialogsEnabled()) {
28 #endif
29 return JavaScriptDialogViews::Create( 23 return JavaScriptDialogViews::Create(
30 parent_web_contents, alerting_web_contents, title, message_type, 24 parent_web_contents, alerting_web_contents, title, message_type,
31 message_text, default_prompt_text, dialog_callback); 25 message_text, default_prompt_text, dialog_callback);
32 #if defined(OS_MACOSX)
33 } else { 26 } else {
34 return JavaScriptDialogCocoa::Create( 27 return JavaScriptDialogCocoa::Create(
35 parent_web_contents, alerting_web_contents, title, message_type, 28 parent_web_contents, alerting_web_contents, title, message_type,
36 message_text, default_prompt_text, dialog_callback); 29 message_text, default_prompt_text, dialog_callback);
37 } 30 }
38 #endif
39 } 31 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/javascript_dialogs/javascript_dialog.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698