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

Side by Side Diff: chrome/browser/ui/input_window_dialog_linux.cc

Issue 8438037: Change 'Add Page' to show a simple input dialog with --use-more-webui. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/input_window_dialog.h" 5 #include "chrome/browser/ui/input_window_dialog.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/webui/chrome_web_ui.h" 8 #include "chrome/browser/ui/webui/chrome_web_ui.h"
9 #include "chrome/browser/ui/webui/input_window_dialog_webui.h" 9 #include "chrome/browser/ui/webui/input_window_dialog_webui.h"
10 10
11 #if !defined(USE_AURA) 11 #if !defined(USE_AURA)
12 #include "chrome/browser/ui/input_window_dialog_gtk.h" 12 #include "chrome/browser/ui/input_window_dialog_gtk.h"
13 #endif 13 #endif
14 14
15 InputWindowDialog* InputWindowDialog::Create(gfx::NativeWindow parent, 15 InputWindowDialog* InputWindowDialog::Create(
16 const string16& window_title, 16 gfx::NativeWindow parent,
17 const string16& label, 17 const string16& window_title,
18 const string16& contents, 18 const LabelContentsPairs& label_contents_pairs,
19 Delegate* delegate, 19 Delegate* delegate,
20 ButtonType type) { 20 ButtonType type) {
21 #if defined(USE_AURA) 21 #if defined(USE_AURA)
22 return new InputWindowDialogWebUI(window_title, label, contents, delegate, 22 return new InputWindowDialogWebUI(window_title,
23 label_contents_pairs,
24 delegate,
23 type); 25 type);
24 #else 26 #else
25 if (ChromeWebUI::IsMoreWebUI()) { 27 if (ChromeWebUI::IsMoreWebUI()) {
26 return new InputWindowDialogWebUI(window_title, label, contents, delegate, 28 return new InputWindowDialogWebUI(window_title,
29 label_contents_pairs,
30 delegate,
27 type); 31 type);
28 } else { 32 } else {
33 DCHECK_EQ(1U, label_contents_pairs.size());
29 return new InputWindowDialogGtk(parent, 34 return new InputWindowDialogGtk(parent,
30 UTF16ToUTF8(window_title), 35 UTF16ToUTF8(window_title),
31 UTF16ToUTF8(label), 36 UTF16ToUTF8(label_contents_pairs[0].first),
32 UTF16ToUTF8(contents), 37 UTF16ToUTF8(label_contents_pairs[0].second),
33 delegate, 38 delegate,
34 type); 39 type);
35 } 40 }
36 #endif 41 #endif
37 } 42 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/input_window_dialog_gtk.cc ('k') | chrome/browser/ui/input_window_dialog_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698