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

Unified Diff: ui/views/style/platform_style_mac.mm

Issue 2358913006: views: remove PlatformStyle::CreateLabelButtonBorder (Closed)
Patch Set: remove DialogButtonBorderMac too Created 4 years, 3 months 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
« no previous file with comments | « ui/views/style/platform_style.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/style/platform_style_mac.mm
diff --git a/ui/views/style/platform_style_mac.mm b/ui/views/style/platform_style_mac.mm
index 8cc98004f6ce3dcd5019c7379b611e0cc968b32d..707c2d9f1f31d36e61122853ea1419bec6853914 100644
--- a/ui/views/style/platform_style_mac.mm
+++ b/ui/views/style/platform_style_mac.mm
@@ -11,11 +11,9 @@
#include "ui/gfx/vector_icons_public.h"
#include "ui/resources/grit/ui_resources.h"
#include "ui/views/controls/button/label_button.h"
-#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/controls/focusable_rounded_border_mac.h"
#import "ui/views/controls/scrollbar/cocoa_scroll_bar.h"
#include "ui/views/style/mac/combobox_background_mac.h"
-#include "ui/views/style/mac/dialog_button_border_mac.h"
#import <Cocoa/Cocoa.h>
@@ -61,15 +59,6 @@
}
// static
-std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
- Button::ButtonStyle style) {
- if (style == Button::STYLE_BUTTON)
- return base::MakeUnique<DialogButtonBorderMac>();
-
- return base::MakeUnique<LabelButtonAssetBorder>(style);
-}
-
-// static
std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
return base::MakeUnique<CocoaScrollBar>(is_horizontal);
}
@@ -79,8 +68,7 @@
const ButtonColorByState& color_by_state,
const LabelButton& button) {
Button::ButtonState state = button.state();
- if (button.style() == Button::STYLE_BUTTON &&
- DialogButtonBorderMac::ShouldRenderDefault(button)) {
+ if (button.style() == Button::STYLE_BUTTON && button.is_default()) {
// For convenience, we currently assume Mac wants the color corresponding to
// the pressed state for default buttons.
state = Button::STATE_PRESSED;
« no previous file with comments | « ui/views/style/platform_style.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698