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

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

Issue 2622893003: Reland f5157480667e99269e0062e9df1df3875db with fix for compile failure. (Closed)
Patch Set: fix in two BUILD.gns Created 3 years, 11 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"
11 #include "ash/common/metrics/user_metrics_action.h" 11 #include "ash/common/metrics/user_metrics_action.h"
12 #include "ash/common/wm/overview/cleanup_animation_observer.h" 12 #include "ash/common/wm/overview/cleanup_animation_observer.h"
13 #include "ash/common/wm/overview/overview_animation_type.h" 13 #include "ash/common/wm/overview/overview_animation_type.h"
14 #include "ash/common/wm/overview/scoped_overview_animation_settings.h" 14 #include "ash/common/wm/overview/scoped_overview_animation_settings.h"
15 #include "ash/common/wm/overview/scoped_overview_animation_settings_factory.h" 15 #include "ash/common/wm/overview/scoped_overview_animation_settings_factory.h"
16 #include "ash/common/wm/overview/scoped_transform_overview_window.h" 16 #include "ash/common/wm/overview/scoped_transform_overview_window.h"
17 #include "ash/common/wm/overview/window_selector.h" 17 #include "ash/common/wm/overview/window_selector.h"
18 #include "ash/common/wm/overview/window_selector_controller.h" 18 #include "ash/common/wm/overview/window_selector_controller.h"
19 #include "ash/common/wm/window_state.h" 19 #include "ash/common/wm/window_state.h"
20 #include "ash/common/wm_lookup.h" 20 #include "ash/common/wm_lookup.h"
21 #include "ash/common/wm_root_window_controller.h" 21 #include "ash/common/wm_root_window_controller.h"
22 #include "ash/common/wm_shell.h" 22 #include "ash/common/wm_shell.h"
23 #include "ash/common/wm_window.h" 23 #include "ash/common/wm_window.h"
24 #include "ash/common/wm_window_property.h" 24 #include "ash/common/wm_window_property.h"
25 #include "ash/public/cpp/shell_window_ids.h" 25 #include "ash/public/cpp/shell_window_ids.h"
26 #include "ash/resources/vector_icons/vector_icons.h"
26 #include "base/auto_reset.h" 27 #include "base/auto_reset.h"
27 #include "base/strings/string_util.h" 28 #include "base/strings/string_util.h"
28 #include "base/strings/utf_string_conversions.h" 29 #include "base/strings/utf_string_conversions.h"
29 #include "base/time/time.h" 30 #include "base/time/time.h"
30 #include "grit/ash_strings.h" 31 #include "grit/ash_strings.h"
31 #include "ui/base/l10n/l10n_util.h" 32 #include "ui/base/l10n/l10n_util.h"
32 #include "ui/compositor/layer_animation_sequence.h" 33 #include "ui/compositor/layer_animation_sequence.h"
33 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 34 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
34 #include "ui/gfx/animation/slide_animation.h" 35 #include "ui/gfx/animation/slide_animation.h"
35 #include "ui/gfx/canvas.h" 36 #include "ui/gfx/canvas.h"
36 #include "ui/gfx/color_utils.h" 37 #include "ui/gfx/color_utils.h"
37 #include "ui/gfx/geometry/safe_integer_conversions.h" 38 #include "ui/gfx/geometry/safe_integer_conversions.h"
38 #include "ui/gfx/paint_vector_icon.h" 39 #include "ui/gfx/paint_vector_icon.h"
39 #include "ui/gfx/transform_util.h" 40 #include "ui/gfx/transform_util.h"
40 #include "ui/gfx/vector_icons_public.h"
41 #include "ui/strings/grit/ui_strings.h" 41 #include "ui/strings/grit/ui_strings.h"
42 #include "ui/views/background.h" 42 #include "ui/views/background.h"
43 #include "ui/views/border.h" 43 #include "ui/views/border.h"
44 #include "ui/views/layout/box_layout.h" 44 #include "ui/views/layout/box_layout.h"
45 #include "ui/views/window/non_client_view.h" 45 #include "ui/views/window/non_client_view.h"
46 #include "ui/wm/core/shadow.h" 46 #include "ui/wm/core/shadow.h"
47 #include "ui/wm/core/shadow_types.h" 47 #include "ui/wm/core/shadow_types.h"
48 #include "ui/wm/core/window_util.h" 48 #include "ui/wm/core/window_util.h"
49 49
50 namespace ash { 50 namespace ash {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 OVERVIEW_ANIMATION_ENTER_OVERVIEW_MODE_FADE_IN, 123 OVERVIEW_ANIMATION_ENTER_OVERVIEW_MODE_FADE_IN,
124 window); 124 window);
125 window->SetOpacity(1.0f); 125 window->SetOpacity(1.0f);
126 } 126 }
127 127
128 } // namespace 128 } // namespace
129 129
130 WindowSelectorItem::OverviewCloseButton::OverviewCloseButton( 130 WindowSelectorItem::OverviewCloseButton::OverviewCloseButton(
131 views::ButtonListener* listener) 131 views::ButtonListener* listener)
132 : views::ImageButton(listener) { 132 : views::ImageButton(listener) {
133 icon_image_ = gfx::CreateVectorIcon(gfx::VectorIconId::WINDOW_CONTROL_CLOSE, 133 SetImage(views::CustomButton::STATE_NORMAL,
134 kCloseButtonColor); 134 gfx::CreateVectorIcon(kWindowControlCloseIcon, kCloseButtonColor));
135 SetImage(views::CustomButton::STATE_NORMAL, &icon_image_);
136 SetImageAlignment(views::ImageButton::ALIGN_CENTER, 135 SetImageAlignment(views::ImageButton::ALIGN_CENTER,
137 views::ImageButton::ALIGN_MIDDLE); 136 views::ImageButton::ALIGN_MIDDLE);
138 SetMinimumImageSize(gfx::Size(kHeaderHeight, kHeaderHeight)); 137 SetMinimumImageSize(gfx::Size(kHeaderHeight, kHeaderHeight));
139 } 138 }
140 139
141 WindowSelectorItem::OverviewCloseButton::~OverviewCloseButton() {} 140 WindowSelectorItem::OverviewCloseButton::~OverviewCloseButton() {}
142 141
143 // A View having rounded top corners and a specified background color which is 142 // A View having rounded top corners and a specified background color which is
144 // only painted within the bounds defined by the rounded corners. 143 // only painted within the bounds defined by the rounded corners.
145 // This class coordinates the transitions of the overview mode header when 144 // This class coordinates the transitions of the overview mode header when
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 785
787 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() { 786 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() {
788 return background_view_ ? background_view_->animation() : nullptr; 787 return background_view_ ? background_view_->animation() : nullptr;
789 } 788 }
790 789
791 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() { 790 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() {
792 return transform_window_.GetOverviewWindowForMinimizedState(); 791 return transform_window_.GetOverviewWindowForMinimizedState();
793 } 792 }
794 793
795 } // namespace ash 794 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_selector_item.h ('k') | ash/frame/caption_buttons/frame_size_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698