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

Side by Side Diff: ui/views/controls/button/text_button.h

Issue 81833007: Remove unnecessary Border subclasses where we can achieve the same functionality (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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
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 #ifndef UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 12 matching lines...) Expand all
23 // A Border subclass for TextButtons that allows configurable insets for the 23 // A Border subclass for TextButtons that allows configurable insets for the
24 // button. 24 // button.
25 class VIEWS_EXPORT TextButtonBorder : public Border { 25 class VIEWS_EXPORT TextButtonBorder : public Border {
26 public: 26 public:
27 TextButtonBorder(); 27 TextButtonBorder();
28 virtual ~TextButtonBorder(); 28 virtual ~TextButtonBorder();
29 29
30 void SetInsets(const gfx::Insets& insets); 30 void SetInsets(const gfx::Insets& insets);
31 31
32 // Border: 32 // Border:
33 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
33 virtual gfx::Insets GetInsets() const OVERRIDE; 34 virtual gfx::Insets GetInsets() const OVERRIDE;
34 35
35 private: 36 private:
36 // Border: 37 // Border:
37 virtual TextButtonBorder* AsTextButtonBorder() OVERRIDE; 38 virtual TextButtonBorder* AsTextButtonBorder() OVERRIDE;
38 virtual const TextButtonBorder* AsTextButtonBorder() const OVERRIDE; 39 virtual const TextButtonBorder* AsTextButtonBorder() const OVERRIDE;
39 40
40 gfx::Insets insets_; 41 gfx::Insets insets_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(TextButtonBorder); 43 DISALLOW_COPY_AND_ASSIGN(TextButtonBorder);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // True if the button should ignore the minimum size for the platform. Default 368 // True if the button should ignore the minimum size for the platform. Default
368 // is true. Set to false to prevent narrower buttons. 369 // is true. Set to false to prevent narrower buttons.
369 bool ignore_minimum_size_; 370 bool ignore_minimum_size_;
370 371
371 DISALLOW_COPY_AND_ASSIGN(TextButton); 372 DISALLOW_COPY_AND_ASSIGN(TextButton);
372 }; 373 };
373 374
374 } // namespace views 375 } // namespace views
375 376
376 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 377 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698