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

Side by Side Diff: ash/frame/custom_frame_view_ash_unittest.cc

Issue 583603004: Add CanMinimize to classes that implement WidgetDelegate::CanMaximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_resizable
Patch Set: Add TODO. Created 6 years, 3 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
« no previous file with comments | « ash/frame/custom_frame_view_ash.cc ('k') | ash/shell/panel_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/frame/custom_frame_view_ash.cc ('k') | ash/shell/panel_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698