summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/base/ui_base_switches.cc6
-rw-r--r--ui/base/ui_base_switches.h1
-rw-r--r--ui/base/win/message_box_win.cc (renamed from ui/base/message_box_win.cc)9
-rw-r--r--ui/base/win/message_box_win.h (renamed from ui/base/message_box_win.h)8
-rw-r--r--ui/ui.gyp4
5 files changed, 15 insertions, 13 deletions
diff --git a/ui/base/ui_base_switches.cc b/ui/base/ui_base_switches.cc
index 8f805fe..a521053 100644
--- a/ui/base/ui_base_switches.cc
+++ b/ui/base/ui_base_switches.cc
@@ -6,7 +6,7 @@
namespace switches {
-// The language file that we want to try to open. Of the form
+// The language file that we want to try to open. Of the form
// language[-country] where language is the 2 letter code from ISO-639.
const char kLang[] = "lang";
@@ -14,6 +14,10 @@ const char kLang[] = "lang";
// path should point to a locale.pak file.
const char kLocalePak[] = "locale_pak";
+// Disable ui::MessageBox. This is useful when running as part of scripts that
+// do not have a user interface.
+const char kNoMessageBox[] = "no-message-box";
+
// Enables UI changes that make it easier to use with a touchscreen.
const char kTouchOptimizedUI[] = "touch-optimized-ui";
diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h
index 30f8a72..cf70319 100644
--- a/ui/base/ui_base_switches.h
+++ b/ui/base/ui_base_switches.h
@@ -15,6 +15,7 @@ namespace switches {
UI_EXPORT extern const char kLang[];
UI_EXPORT extern const char kLocalePak[];
+UI_EXPORT extern const char kNoMessageBox[];
UI_EXPORT extern const char kTouchOptimizedUI[];
#if defined(OS_MACOSX)
diff --git a/ui/base/message_box_win.cc b/ui/base/win/message_box_win.cc
index 622a9d8..c78e98b 100644
--- a/ui/base/message_box_win.cc
+++ b/ui/base/win/message_box_win.cc
@@ -1,15 +1,12 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/base/message_box_win.h"
+#include "ui/base/win/message_box_win.h"
-#include <windows.h>
-
-#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/i18n/rtl.h"
-#include "base/string16.h"
+#include "ui/base/ui_base_switches.h"
namespace ui {
diff --git a/ui/base/message_box_win.h b/ui/base/win/message_box_win.h
index ce0512f..49f15ed 100644
--- a/ui/base/message_box_win.h
+++ b/ui/base/win/message_box_win.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_MESSAGE_BOX_WIN_H_
-#define UI_BASE_MESSAGE_BOX_WIN_H_
+#ifndef UI_BASE_WIN_MESSAGE_BOX_WIN_H_
+#define UI_BASE_WIN_MESSAGE_BOX_WIN_H_
#pragma once
#include <windows.h>
@@ -24,4 +24,4 @@ UI_EXPORT int MessageBox(HWND hwnd,
} // namespace ui
-#endif // UI_BASE_MESSAGE_BOX_WIN_H_
+#endif // UI_BASE_WIN_MESSAGE_BOX_WIN_H_
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 7828b68..6d5aa33 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -169,8 +169,6 @@
'base/l10n/l10n_util_posix.cc',
'base/l10n/l10n_util_win.cc',
'base/l10n/l10n_util_win.h',
- 'base/message_box_win.cc',
- 'base/message_box_win.h',
'base/models/button_menu_item_model.cc',
'base/models/button_menu_item_model.h',
'base/models/combobox_model.h',
@@ -231,6 +229,8 @@
'base/win/hwnd_util.h',
'base/win/ime_input.cc',
'base/win/ime_input.h',
+ 'base/win/message_box_win.cc',
+ 'base/win/message_box_win.h',
'base/win/mouse_wheel_util.cc',
'base/win/mouse_wheel_util.h',
'base/win/shell.cc',