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

Side by Side Diff: ui/views/window/custom_frame_view_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: hwnd_message_handler 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
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 "ui/views/window/custom_frame_view.h" 5 #include "ui/views/window/custom_frame_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ui/views/controls/button/image_button.h" 9 #include "ui/views/controls/button/image_button.h"
10 #include "ui/views/test/views_test_base.h" 10 #include "ui/views/test/views_test_base.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 MaximizeStateControlDelegate() : can_maximize_(true) {} 24 MaximizeStateControlDelegate() : can_maximize_(true) {}
25 virtual ~MaximizeStateControlDelegate() {} 25 virtual ~MaximizeStateControlDelegate() {}
26 26
27 void set_can_maximize(bool can_maximize) { 27 void set_can_maximize(bool can_maximize) {
28 can_maximize_ = can_maximize; 28 can_maximize_ = can_maximize;
29 } 29 }
30 30
31 // WidgetDelegate: 31 // WidgetDelegate:
32 virtual bool CanMaximize() const OVERRIDE { return can_maximize_; } 32 virtual bool CanMaximize() const OVERRIDE { return can_maximize_; }
33 virtual bool CanMinimize() const OVERRIDE { return can_maximize_; }
33 34
34 private: 35 private:
35 bool can_maximize_; 36 bool can_maximize_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(MaximizeStateControlDelegate); 38 DISALLOW_COPY_AND_ASSIGN(MaximizeStateControlDelegate);
38 }; 39 };
39 40
40 } // namespace 41 } // namespace
41 42
42 class CustomFrameViewTest : public ViewsTestBase { 43 class CustomFrameViewTest : public ViewsTestBase {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 parent->Maximize(); 244 parent->Maximize();
244 view->Layout(); 245 view->Layout();
245 246
246 EXPECT_GT(close_button()->bounds().width(), 247 EXPECT_GT(close_button()->bounds().width(),
247 close_button_initial_bounds.width()); 248 close_button_initial_bounds.width());
248 EXPECT_GT(minimize_button()->bounds().width(), 249 EXPECT_GT(minimize_button()->bounds().width(),
249 minimize_button_initial_bounds.width()); 250 minimize_button_initial_bounds.width());
250 } 251 }
251 252
252 } // namespace views 253 } // namespace views
OLDNEW
« ash/frame/custom_frame_view_ash.cc ('K') | « ui/views/win/hwnd_message_handler_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698