OLD | NEW |
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/wm/caption_buttons/alternate_frame_size_button.h" | 5 #include "ash/wm/caption_buttons/alternate_frame_size_button.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/wm/caption_buttons/frame_caption_button.h" | 10 #include "ash/wm/caption_buttons/frame_caption_button.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const ViewHierarchyChangedDetails& details) OVERRIDE { | 61 const ViewHierarchyChangedDetails& details) OVERRIDE { |
62 if (details.is_add && details.child == this) { | 62 if (details.is_add && details.child == this) { |
63 caption_button_container_ = new FrameCaptionButtonContainerView( | 63 caption_button_container_ = new FrameCaptionButtonContainerView( |
64 GetWidget(), FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); | 64 GetWidget(), FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); |
65 | 65 |
66 // Set arbitrary images for the container's buttons so that the buttons | 66 // Set arbitrary images for the container's buttons so that the buttons |
67 // have non-empty sizes. | 67 // have non-empty sizes. |
68 for (int icon = 0; icon < CAPTION_BUTTON_ICON_COUNT; ++icon) { | 68 for (int icon = 0; icon < CAPTION_BUTTON_ICON_COUNT; ++icon) { |
69 caption_button_container_->SetButtonImages( | 69 caption_button_container_->SetButtonImages( |
70 static_cast<CaptionButtonIcon>(icon), | 70 static_cast<CaptionButtonIcon>(icon), |
71 IDR_AURA_WINDOW_CLOSE, | 71 IDR_AURA_WINDOW_CONTROL_ICON_CLOSE, |
72 IDR_AURA_WINDOW_CLOSE_H, | 72 IDR_AURA_WINDOW_CONTROL_ICON_CLOSE_I, |
73 IDR_AURA_WINDOW_CLOSE_P); | 73 IDR_AURA_WINDOW_CONTROL_BACKGROUND_H, |
| 74 IDR_AURA_WINDOW_CONTROL_BACKGROUND_P); |
74 } | 75 } |
75 | 76 |
76 AddChildView(caption_button_container_); | 77 AddChildView(caption_button_container_); |
77 } | 78 } |
78 } | 79 } |
79 | 80 |
80 // Not owned. | 81 // Not owned. |
81 ash::FrameCaptionButtonContainerView* caption_button_container_; | 82 ash::FrameCaptionButtonContainerView* caption_button_container_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); | 84 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 | 371 |
371 // The buttons should stay unpressed and the buttons should now have their | 372 // The buttons should stay unpressed and the buttons should now have their |
372 // regular icons. | 373 // regular icons. |
373 EXPECT_TRUE(AllButtonsInNormalState()); | 374 EXPECT_TRUE(AllButtonsInNormalState()); |
374 EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon()); | 375 EXPECT_EQ(CAPTION_BUTTON_ICON_MINIMIZE, minimize_button()->icon()); |
375 EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon()); | 376 EXPECT_EQ(CAPTION_BUTTON_ICON_CLOSE, close_button()->icon()); |
376 } | 377 } |
377 | 378 |
378 } // namespace test | 379 } // namespace test |
379 } // namespace ash | 380 } // namespace ash |
OLD | NEW |