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

Side by Side Diff: ash/common/wm/overview/window_selector_item.cc

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: fix cros build Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/wm/overview/window_selector_item.h" 5 #include "ash/common/wm/overview/window_selector_item.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // views::View: 140 // views::View:
141 const char* GetClassName() const override { return "ShieldButton"; } 141 const char* GetClassName() const override { return "ShieldButton"; }
142 142
143 private: 143 private:
144 DISALLOW_COPY_AND_ASSIGN(ShieldButton); 144 DISALLOW_COPY_AND_ASSIGN(ShieldButton);
145 }; 145 };
146 146
147 } // namespace 147 } // namespace
148 148
149 WindowSelectorItem::OverviewCloseButton::OverviewCloseButton( 149 WindowSelectorItem::OverviewCloseButton::OverviewCloseButton(
150 views::ButtonListener* listener) 150 views::ImageButtonDelegate* delegate)
151 : views::ImageButton(listener) { 151 : views::ImageButton(delegate) {
152 SetImage(views::CustomButton::STATE_NORMAL, 152 SetImage(views::CustomButton::STATE_NORMAL,
153 gfx::CreateVectorIcon(kWindowControlCloseIcon, kCloseButtonColor)); 153 gfx::CreateVectorIcon(kWindowControlCloseIcon, kCloseButtonColor));
154 SetImageAlignment(views::ImageButton::ALIGN_CENTER, 154 SetImageAlignment(views::ImageButton::ALIGN_CENTER,
155 views::ImageButton::ALIGN_MIDDLE); 155 views::ImageButton::ALIGN_MIDDLE);
156 SetMinimumImageSize(gfx::Size(kHeaderHeight, kHeaderHeight)); 156 SetMinimumImageSize(gfx::Size(kHeaderHeight, kHeaderHeight));
157 } 157 }
158 158
159 WindowSelectorItem::OverviewCloseButton::~OverviewCloseButton() {} 159 WindowSelectorItem::OverviewCloseButton::~OverviewCloseButton() {}
160 160
161 // A View having rounded top corners and a specified background color which is 161 // A View having rounded top corners and a specified background color which is
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 755
756 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() { 756 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() {
757 return background_view_ ? background_view_->animation() : nullptr; 757 return background_view_ ? background_view_->animation() : nullptr;
758 } 758 }
759 759
760 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() { 760 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() {
761 return transform_window_.GetOverviewWindowForMinimizedState(); 761 return transform_window_.GetOverviewWindowForMinimizedState();
762 } 762 }
763 763
764 } // namespace ash 764 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698