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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_button.cc

Issue 1270343004: Update LabelButtons in the Toolbar for Material Design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/toolbar_button.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index 1c85d9a85d1f6753d74424d2fcfdd05a60ad7fa2..45e429b658cf89c1f67c7609cd6fd1629cc0b303 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -161,24 +161,8 @@ void ToolbarButton::GetAccessibleState(ui::AXViewState* state) {
scoped_ptr<views::LabelButtonBorder>
ToolbarButton::CreateDefaultBorder() const {
- scoped_ptr<views::LabelButtonBorder> border;
- if (ui::MaterialDesignController::IsModeMaterial()) {
-#if defined(OS_CHROMEOS)
- border.reset(new views::LabelButtonBorder());
- border->set_insets(views::LabelButtonAssetBorder::GetDefaultInsetsForStyle(
- Button::STYLE_TEXTBUTTON));
-#else
- scoped_ptr<views::LabelButtonAssetBorder> asset_border(
- new views::LabelButtonAssetBorder(Button::STYLE_TEXTBUTTON));
- // The material design spec does not include a visual effect for the
- // STATE_HOVERED button state so we have to remove the default one added by
- // LabelButtonAssetBorder.
- asset_border->SetPainter(false, Button::STATE_HOVERED, nullptr);
- border = asset_border.Pass();
-#endif
- } else {
- border.reset(new views::LabelButtonAssetBorder(Button::STYLE_TEXTBUTTON));
- }
+ scoped_ptr<views::LabelButtonBorder> border =
+ views::LabelButton::CreateDefaultBorder();
ui::ThemeProvider* provider = GetThemeProvider();
if (provider && provider->UsingSystemTheme()) {
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698