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

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

Issue 2441923004: Revert of Added common layout framework for system menu rows. (Closed)
Patch Set: 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
« no previous file with comments | « ui/views/test/test_views.h ('k') | ui/views/view.cc » ('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 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 #include "ui/views/test/test_views.h" 5 #include "ui/views/test/test_views.h"
6 6
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/views/widget/native_widget_private.h" 8 #include "ui/views/widget/native_widget_private.h"
9 #include "ui/views/widget/widget.h" 9 #include "ui/views/widget/widget.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 StaticSizedView::StaticSizedView(const gfx::Size& preferred_size) 13 StaticSizedView::StaticSizedView(const gfx::Size& size)
14 // Default GetMinimumSize() is GetPreferredSize(). Default GetMaximumSize() 14 // Default GetMinimumSize() is GetPreferredSize(). Default GetMaximumSize()
15 // is 0x0. 15 // is 0x0.
16 : preferred_size_(preferred_size), 16 : size_(size),
17 minimum_size_(preferred_size) {} 17 minimum_size_(size) {
18 }
18 19
19 StaticSizedView::~StaticSizedView() {} 20 StaticSizedView::~StaticSizedView() {}
20 21
21 gfx::Size StaticSizedView::GetPreferredSize() const { 22 gfx::Size StaticSizedView::GetPreferredSize() const {
22 return preferred_size_; 23 return size_;
23 } 24 }
24 25
25 gfx::Size StaticSizedView::GetMinimumSize() const { 26 gfx::Size StaticSizedView::GetMinimumSize() const {
26 return minimum_size_; 27 return minimum_size_;
27 } 28 }
28 29
29 gfx::Size StaticSizedView::GetMaximumSize() const { 30 gfx::Size StaticSizedView::GetMaximumSize() const {
30 return maximum_size_; 31 return maximum_size_;
31 } 32 }
32 33
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 100 }
100 101
101 void EventCountView::RecordEvent(ui::Event* event) { 102 void EventCountView::RecordEvent(ui::Event* event) {
102 ++event_count_[event->type()]; 103 ++event_count_[event->type()];
103 last_flags_ = event->flags(); 104 last_flags_ = event->flags();
104 if (handle_mode_ == CONSUME_EVENTS) 105 if (handle_mode_ == CONSUME_EVENTS)
105 event->SetHandled(); 106 event->SetHandled();
106 } 107 }
107 108
108 } // namespace views 109 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/test_views.h ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698