diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-04 23:02:01 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-04 23:02:01 +0000 |
commit | 9e2cf275e8780741004c0f5245bce7f7e0afab4b (patch) | |
tree | 271a788f8fe9e28bf7b9395774d5983ede882de0 /ui | |
parent | 1505a514e4a8c453a7d8f10947270c4af84664b7 (diff) | |
download | chromium_src-9e2cf275e8780741004c0f5245bce7f7e0afab4b.zip chromium_src-9e2cf275e8780741004c0f5245bce7f7e0afab4b.tar.gz chromium_src-9e2cf275e8780741004c0f5245bce7f7e0afab4b.tar.bz2 |
Remove new dialog style command-line flags, etc.
Remove --[en|dis]able-new-dialog-style command-line flags.
Remove the corresponding strings and about:flags entry.
The new dialog style has been on-by-default since M-29.
Retain DialogDelegate::UseNewStyle() for Views/Win Textfield.
(new dialogs can't host the off-by-default Win Textfields)
(this will go away once I remove the Views Textfield flags)
Retain split DialogDelegate::UseNewStyleForThisDialog() codepaths.
(we explicitly want the old style for some dialogs see Issue 246777)
(task manager, about:ipc dialog, extension (cros save/open) dialog)
(this could go away if we made those windows not use dialog code)
BUG=166075,282698
TEST=New dialog style is used on Windows/CrOS everywhere except for the Task Manager, about:ipc dialog (Win only), and Extension (CrOS save/open) dialogs. The old dialog style is used with --disable-views-textfields for technical reasons.
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23530019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221292 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/ui_base_switches.cc | 6 | ||||
-rw-r--r-- | ui/base/ui_base_switches.h | 2 | ||||
-rw-r--r-- | ui/base/ui_base_switches_util.cc | 9 | ||||
-rw-r--r-- | ui/base/ui_base_switches_util.h | 2 | ||||
-rw-r--r-- | ui/views/controls/textfield/textfield.cc | 4 | ||||
-rw-r--r-- | ui/views/window/dialog_delegate.cc | 5 |
6 files changed, 2 insertions, 26 deletions
diff --git a/ui/base/ui_base_switches.cc b/ui/base/ui_base_switches.cc index 7e27ea6..bf5fff3 100644 --- a/ui/base/ui_base_switches.cc +++ b/ui/base/ui_base_switches.cc @@ -9,9 +9,6 @@ namespace switches { // Disables use of DWM composition for top level windows. const char kDisableDwmComposition[] = "disable-dwm-composition"; -// Disables the new visual style for application dialogs and controls. -const char kDisableNewDialogStyle[] = "disable-new-dialog-style"; - // Disables touch adjustment. const char kDisableTouchAdjustment[] = "disable-touch-adjustment"; @@ -24,9 +21,6 @@ const char kDisableTouchEditing[] = "disable-touch-editing"; // Disables the Views textfield on Windows. const char kDisableViewsTextfield[] = "disable-views-textfield"; -// Enables the new visual style for application dialogs and controls. -const char kEnableNewDialogStyle[] = "enable-new-dialog-style"; - // Enable scroll prediction for scroll update events. const char kEnableScrollPrediction[] = "enable-scroll-prediction"; diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h index 11887d4..4f0850b 100644 --- a/ui/base/ui_base_switches.h +++ b/ui/base/ui_base_switches.h @@ -13,12 +13,10 @@ namespace switches { UI_EXPORT extern const char kDisableDwmComposition[]; -UI_EXPORT extern const char kDisableNewDialogStyle[]; UI_EXPORT extern const char kDisableTouchAdjustment[]; UI_EXPORT extern const char kDisableTouchDragDrop[]; UI_EXPORT extern const char kDisableTouchEditing[]; UI_EXPORT extern const char kDisableViewsTextfield[]; -UI_EXPORT extern const char kEnableNewDialogStyle[]; UI_EXPORT extern const char kEnableScrollPrediction[]; UI_EXPORT extern const char kEnableTouchDragDrop[]; UI_EXPORT extern const char kEnableTouchEditing[]; diff --git a/ui/base/ui_base_switches_util.cc b/ui/base/ui_base_switches_util.cc index 3203421..3089607 100644 --- a/ui/base/ui_base_switches_util.cc +++ b/ui/base/ui_base_switches_util.cc @@ -29,13 +29,4 @@ bool IsTouchEditingEnabled() { #endif } -bool IsNewDialogStyleEnabled() { - CommandLine* command_line = CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(switches::kDisableNewDialogStyle)) - return false; - if (command_line->HasSwitch(switches::kEnableNewDialogStyle)) - return true; - return true; -} - } // namespace switches diff --git a/ui/base/ui_base_switches_util.h b/ui/base/ui_base_switches_util.h index 4c10261..c64da8f 100644 --- a/ui/base/ui_base_switches_util.h +++ b/ui/base/ui_base_switches_util.h @@ -13,8 +13,6 @@ namespace switches { UI_EXPORT bool IsTouchDragDropEnabled(); UI_EXPORT bool IsTouchEditingEnabled(); -UI_EXPORT bool IsNewDialogStyleEnabled(); - } // namespace switches #endif // UI_BASE_UI_BASE_SWITCHES_UTIL_H_ diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc index 4787e4e..e358657 100644 --- a/ui/views/controls/textfield/textfield.cc +++ b/ui/views/controls/textfield/textfield.cc @@ -16,7 +16,6 @@ #include "ui/base/range/range.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_switches.h" -#include "ui/base/ui_base_switches_util.h" #include "ui/gfx/insets.h" #include "ui/gfx/selection_model.h" #include "ui/native_theme/native_theme.h" @@ -62,9 +61,6 @@ bool Textfield::IsViewsTextfieldEnabled() { return false; if (command_line->HasSwitch(switches::kEnableViewsTextfield)) return true; - // The new dialog style cannot host native Windows textfield controls. - if (switches::IsNewDialogStyleEnabled()) - return true; // Avoid native Windows Textfields if the RichEdit library is not available. static const HMODULE loaded_msftedit_dll = LoadLibrary(L"msftedit.dll"); if (!loaded_msftedit_dll) diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc index 84a6ee4..04fcebb 100644 --- a/ui/views/window/dialog_delegate.cc +++ b/ui/views/window/dialog_delegate.cc @@ -7,7 +7,6 @@ #include "base/logging.h" #include "grit/ui_strings.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/base/ui_base_switches_util.h" #include "ui/views/bubble/bubble_border.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/button/label_button.h" @@ -30,8 +29,8 @@ DialogDelegate::~DialogDelegate() { // static bool DialogDelegate::UseNewStyle() { - return switches::IsNewDialogStyleEnabled() && - Textfield::IsViewsTextfieldEnabled(); + // The new dialog style cannot host native Windows textfield controls. + return Textfield::IsViewsTextfieldEnabled(); } // static |