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

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

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 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/focus_manager_test.h ('k') | ui/views/test/test_views_delegate.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 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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 // A view that requests a set amount of space. 13 // A view that requests a set amount of space.
14 class StaticSizedView : public View { 14 class StaticSizedView : public View {
15 public: 15 public:
16 explicit StaticSizedView(const gfx::Size& size); 16 explicit StaticSizedView(const gfx::Size& size);
17 virtual ~StaticSizedView(); 17 virtual ~StaticSizedView();
18 18
19 virtual gfx::Size GetPreferredSize() const OVERRIDE; 19 virtual gfx::Size GetPreferredSize() const override;
20 20
21 private: 21 private:
22 gfx::Size size_; 22 gfx::Size size_;
23 23
24 DISALLOW_COPY_AND_ASSIGN(StaticSizedView); 24 DISALLOW_COPY_AND_ASSIGN(StaticSizedView);
25 }; 25 };
26 26
27 // A view that accomodates testing layouts that use GetHeightForWidth. 27 // A view that accomodates testing layouts that use GetHeightForWidth.
28 class ProportionallySizedView : public View { 28 class ProportionallySizedView : public View {
29 public: 29 public:
30 explicit ProportionallySizedView(int factor); 30 explicit ProportionallySizedView(int factor);
31 virtual ~ProportionallySizedView(); 31 virtual ~ProportionallySizedView();
32 32
33 void set_preferred_width(int width) { preferred_width_ = width; } 33 void set_preferred_width(int width) { preferred_width_ = width; }
34 34
35 virtual int GetHeightForWidth(int w) const OVERRIDE; 35 virtual int GetHeightForWidth(int w) const override;
36 virtual gfx::Size GetPreferredSize() const OVERRIDE; 36 virtual gfx::Size GetPreferredSize() const override;
37 37
38 private: 38 private:
39 // The multiplicative factor between width and height, i.e. 39 // The multiplicative factor between width and height, i.e.
40 // height = width * factor_. 40 // height = width * factor_.
41 int factor_; 41 int factor_;
42 42
43 // The width used as the preferred size. -1 if not used. 43 // The width used as the preferred size. -1 if not used.
44 int preferred_width_; 44 int preferred_width_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(ProportionallySizedView); 46 DISALLOW_COPY_AND_ASSIGN(ProportionallySizedView);
47 }; 47 };
48 48
49 } // namespace views 49 } // namespace views
50 50
51 #endif // UI_VIEWS_TEST_TEST_VIEWS_H_ 51 #endif // UI_VIEWS_TEST_TEST_VIEWS_H_
OLDNEW
« no previous file with comments | « ui/views/test/focus_manager_test.h ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698