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

Unified Diff: ui/views/window/dialog_client_view.cc

Issue 63343004: Remove DialogDelegate::UseNewStyle and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional cleanup; sync and rebase. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/window/dialog_client_view.cc
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index e03c8a1413d51618f5196741709f44ccabe81ac3..643d6de0712204e36203b41b0a4194a38438b358 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -256,9 +256,7 @@ void DialogClientView::ViewHierarchyChanged(
// The old dialog style needs an explicit background color, while the new
// dialog style simply inherits the bubble's frame view color.
const DialogDelegate* dialog = GetDialogDelegate();
- const bool use_new_style = dialog ?
- dialog->UseNewStyleForThisDialog() : DialogDelegate::UseNewStyle();
- if (!use_new_style)
+ if (dialog && !dialog->UseNewStyleForThisDialog())
set_background(views::Background::CreateSolidBackground(GetNativeTheme()->
GetSystemColor(ui::NativeTheme::kColorId_DialogBackground)));
@@ -400,15 +398,10 @@ int DialogClientView::GetButtonsAndExtraViewRowHeight() const {
}
gfx::Insets DialogClientView::GetButtonRowInsets() const {
- if (GetButtonsAndExtraViewRowHeight() == 0)
- return gfx::Insets();
-
// NOTE: The insets only apply to the buttons, extra view, and footnote view.
- return DialogDelegate::UseNewStyle() ?
+ return GetButtonsAndExtraViewRowHeight() == 0 ? gfx::Insets() :
gfx::Insets(0, kButtonHEdgeMarginNew,
- kButtonVEdgeMarginNew, kButtonHEdgeMarginNew) :
- gfx::Insets(0, kButtonHEdgeMargin,
- kButtonVEdgeMargin, kButtonHEdgeMargin);
+ kButtonVEdgeMarginNew, kButtonHEdgeMarginNew);
}
void DialogClientView::Close() {

Powered by Google App Engine
This is Rietveld 408576698