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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/frame/custom_frame_view_ash.cc ('k') | ash/ime/candidate_view.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 30 matching lines...) Expand all
41 41
42 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate); 42 DISALLOW_COPY_AND_ASSIGN(TestWidgetDelegate);
43 }; 43 };
44 44
45 class TestWidgetConstraintsDelegate : public TestWidgetDelegate { 45 class TestWidgetConstraintsDelegate : public TestWidgetDelegate {
46 public: 46 public:
47 TestWidgetConstraintsDelegate() {} 47 TestWidgetConstraintsDelegate() {}
48 virtual ~TestWidgetConstraintsDelegate() {} 48 virtual ~TestWidgetConstraintsDelegate() {}
49 49
50 // views::View: 50 // views::View:
51 virtual gfx::Size GetMinimumSize() OVERRIDE { 51 virtual gfx::Size GetMinimumSize() const OVERRIDE {
52 return minimum_size_; 52 return minimum_size_;
53 } 53 }
54 54
55 virtual gfx::Size GetMaximumSize() OVERRIDE { 55 virtual gfx::Size GetMaximumSize() OVERRIDE {
56 return maximum_size_; 56 return maximum_size_;
57 } 57 }
58 58
59 virtual views::View* GetContentsView() OVERRIDE { 59 virtual views::View* GetContentsView() OVERRIDE {
60 // Set this instance as the contents view so that the maximum and minimum 60 // Set this instance as the contents view so that the maximum and minimum
61 // size constraints will be used. 61 // size constraints will be used.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 const gfx::Rect maximize_mode_bounds = delegate-> 213 const gfx::Rect maximize_mode_bounds = delegate->
214 GetFrameCaptionButtonContainerViewBounds(); 214 GetFrameCaptionButtonContainerViewBounds();
215 EXPECT_GT(initial.width(), maximize_mode_bounds.width()); 215 EXPECT_GT(initial.width(), maximize_mode_bounds.width());
216 Shell::GetInstance()->EnableMaximizeModeWindowManager(false); 216 Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
217 const gfx::Rect after_restore = delegate-> 217 const gfx::Rect after_restore = delegate->
218 GetFrameCaptionButtonContainerViewBounds(); 218 GetFrameCaptionButtonContainerViewBounds();
219 EXPECT_EQ(initial, after_restore); 219 EXPECT_EQ(initial, after_restore);
220 } 220 }
221 221
222 } // namespace ash 222 } // namespace ash
OLDNEW
« no previous file with comments | « ash/frame/custom_frame_view_ash.cc ('k') | ash/ime/candidate_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698