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

Side by Side Diff: ui/views/widget/widget_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 | « ui/views/widget/widget.cc ('k') | ui/views/window/client_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 }; 118 };
119 119
120 // A view that implements GetMinimumSize. 120 // A view that implements GetMinimumSize.
121 class MinimumSizeFrameView : public NativeFrameView { 121 class MinimumSizeFrameView : public NativeFrameView {
122 public: 122 public:
123 explicit MinimumSizeFrameView(Widget* frame): NativeFrameView(frame) {} 123 explicit MinimumSizeFrameView(Widget* frame): NativeFrameView(frame) {}
124 virtual ~MinimumSizeFrameView() {} 124 virtual ~MinimumSizeFrameView() {}
125 125
126 private: 126 private:
127 // Overridden from View: 127 // Overridden from View:
128 virtual gfx::Size GetMinimumSize() OVERRIDE { 128 virtual gfx::Size GetMinimumSize() const OVERRIDE {
129 return gfx::Size(300, 400); 129 return gfx::Size(300, 400);
130 } 130 }
131 131
132 DISALLOW_COPY_AND_ASSIGN(MinimumSizeFrameView); 132 DISALLOW_COPY_AND_ASSIGN(MinimumSizeFrameView);
133 }; 133 };
134 134
135 // An event handler that simply keeps a count of the different types of events 135 // An event handler that simply keeps a count of the different types of events
136 // it receives. 136 // it receives.
137 class EventCountHandler : public ui::EventHandler { 137 class EventCountHandler : public ui::EventHandler {
138 public: 138 public:
(...skipping 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after
2463 child_widget.Init(child_params); 2463 child_widget.Init(child_params);
2464 child_widget.AddObserver(&observer); 2464 child_widget.AddObserver(&observer);
2465 child_widget.Show(); 2465 child_widget.Show();
2466 2466
2467 parent_widget.CloseNow(); 2467 parent_widget.CloseNow();
2468 } 2468 }
2469 #endif 2469 #endif
2470 2470
2471 } // namespace test 2471 } // namespace test
2472 } // namespace views 2472 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.cc ('k') | ui/views/window/client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698