OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame/custom_frame_view_ash.h" | 5 #include "ash/frame/custom_frame_view_ash.h" |
6 | 6 |
7 #include "ash/frame/caption_buttons/frame_caption_button.h" | 7 #include "ash/frame/caption_buttons/frame_caption_button.h" |
8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Set this instance as the contents view so that the maximum and minimum | 61 // Set this instance as the contents view so that the maximum and minimum |
62 // size constraints will be used. | 62 // size constraints will be used. |
63 return this; | 63 return this; |
64 } | 64 } |
65 | 65 |
66 // views::WidgetDelegate: | 66 // views::WidgetDelegate: |
67 virtual bool CanMaximize() const OVERRIDE { | 67 virtual bool CanMaximize() const OVERRIDE { |
68 return true; | 68 return true; |
69 } | 69 } |
70 | 70 |
| 71 virtual bool CanMinimize() const OVERRIDE { |
| 72 return true; |
| 73 } |
| 74 |
71 void set_minimum_size(const gfx::Size& min_size) { | 75 void set_minimum_size(const gfx::Size& min_size) { |
72 minimum_size_ = min_size; | 76 minimum_size_ = min_size; |
73 } | 77 } |
74 | 78 |
75 void set_maximum_size(const gfx::Size& max_size) { | 79 void set_maximum_size(const gfx::Size& max_size) { |
76 maximum_size_ = max_size; | 80 maximum_size_ = max_size; |
77 } | 81 } |
78 | 82 |
79 const gfx::Rect& GetFrameCaptionButtonContainerViewBounds() { | 83 const gfx::Rect& GetFrameCaptionButtonContainerViewBounds() { |
80 return custom_frame_view()->GetFrameCaptionButtonContainerViewForTest()-> | 84 return custom_frame_view()->GetFrameCaptionButtonContainerViewForTest()-> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 EXPECT_GT(initial.width(), maximize_mode_bounds.width()); | 228 EXPECT_GT(initial.width(), maximize_mode_bounds.width()); |
225 Shell::GetInstance()->maximize_mode_controller()-> | 229 Shell::GetInstance()->maximize_mode_controller()-> |
226 EnableMaximizeModeWindowManager(false); | 230 EnableMaximizeModeWindowManager(false); |
227 delegate->EndFrameCaptionButtonContainerViewAnimations(); | 231 delegate->EndFrameCaptionButtonContainerViewAnimations(); |
228 const gfx::Rect after_restore = delegate-> | 232 const gfx::Rect after_restore = delegate-> |
229 GetFrameCaptionButtonContainerViewBounds(); | 233 GetFrameCaptionButtonContainerViewBounds(); |
230 EXPECT_EQ(initial, after_restore); | 234 EXPECT_EQ(initial, after_restore); |
231 } | 235 } |
232 | 236 |
233 } // namespace ash | 237 } // namespace ash |
OLD | NEW |