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

Side by Side Diff: ui/views/test/test_views.h

Issue 2414103003: Added common layout framework for system menu rows. (Closed)
Patch Set: Removed VIEWS_EXPORT from TestLayoutManager and replaced TestView with StaticSizedView. Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef UI_VIEWS_TEST_TEST_VIEWS_H_ 5 #ifndef UI_VIEWS_TEST_TEST_VIEWS_H_
6 #define UI_VIEWS_TEST_TEST_VIEWS_H_ 6 #define UI_VIEWS_TEST_TEST_VIEWS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/events/event_constants.h" 11 #include "ui/events/event_constants.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 13
14 namespace views { 14 namespace views {
15 15
16 // A view that requests a set amount of space. 16 // A view that requests a set amount of space.
17 class StaticSizedView : public View { 17 class StaticSizedView : public View {
18 public: 18 public:
19 StaticSizedView();
19 explicit StaticSizedView(const gfx::Size& size); 20 explicit StaticSizedView(const gfx::Size& size);
sky 2016/10/20 15:59:11 How about making the size an optional parameter? A
bruthig 2016/10/20 19:01:34 Done.
20 ~StaticSizedView() override; 21 ~StaticSizedView() override;
21 22
22 void set_minimum_size(const gfx::Size& minimum_size) { 23 void set_minimum_size(const gfx::Size& minimum_size) {
23 minimum_size_ = minimum_size; 24 minimum_size_ = minimum_size;
24 } 25 }
25 26
26 void set_maximum_size(const gfx::Size& maximum_size) { 27 void set_maximum_size(const gfx::Size& maximum_size) {
27 maximum_size_ = maximum_size; 28 maximum_size_ = maximum_size;
28 } 29 }
29 30
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 std::map<ui::EventType, int> event_count_; 112 std::map<ui::EventType, int> event_count_;
112 int last_flags_; 113 int last_flags_;
113 HandleMode handle_mode_; 114 HandleMode handle_mode_;
114 115
115 DISALLOW_COPY_AND_ASSIGN(EventCountView); 116 DISALLOW_COPY_AND_ASSIGN(EventCountView);
116 }; 117 };
117 118
118 } // namespace views 119 } // namespace views
119 120
120 #endif // UI_VIEWS_TEST_TEST_VIEWS_H_ 121 #endif // UI_VIEWS_TEST_TEST_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698