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

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

Issue 10358013: views: Mark single-argument constructors as explicit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // 85 //
86 // TextButtonNativeThemeBorder 86 // TextButtonNativeThemeBorder
87 // 87 //
88 // A Border subclass that paints a TextButton's background layer using the 88 // A Border subclass that paints a TextButton's background layer using the
89 // platform's native theme look. This handles normal/disabled/hot/pressed 89 // platform's native theme look. This handles normal/disabled/hot/pressed
90 // states, with possible animation between states. 90 // states, with possible animation between states.
91 // 91 //
92 //////////////////////////////////////////////////////////////////////////////// 92 ////////////////////////////////////////////////////////////////////////////////
93 class VIEWS_EXPORT TextButtonNativeThemeBorder : public Border { 93 class VIEWS_EXPORT TextButtonNativeThemeBorder : public Border {
94 public: 94 public:
95 TextButtonNativeThemeBorder(NativeThemeDelegate* delegate); 95 explicit TextButtonNativeThemeBorder(NativeThemeDelegate* delegate);
96 virtual ~TextButtonNativeThemeBorder(); 96 virtual ~TextButtonNativeThemeBorder();
97 97
98 // Implementation of Border: 98 // Implementation of Border:
99 virtual void Paint(const View& view, gfx::Canvas* canvas) const OVERRIDE; 99 virtual void Paint(const View& view, gfx::Canvas* canvas) const OVERRIDE;
100 virtual void GetInsets(gfx::Insets* insets) const OVERRIDE; 100 virtual void GetInsets(gfx::Insets* insets) const OVERRIDE;
101 101
102 private: 102 private:
103 // The delegate the controls the appearance of this border. 103 // The delegate the controls the appearance of this border.
104 NativeThemeDelegate* delegate_; 104 NativeThemeDelegate* delegate_;
105 105
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // 392 //
393 // A TextButton that uses the NativeTheme border and sets some properties, 393 // A TextButton that uses the NativeTheme border and sets some properties,
394 // like ignore-minimize-size and text alignment minimum size. 394 // like ignore-minimize-size and text alignment minimum size.
395 // 395 //
396 //////////////////////////////////////////////////////////////////////////////// 396 ////////////////////////////////////////////////////////////////////////////////
397 class VIEWS_EXPORT NativeTextButton : public TextButton { 397 class VIEWS_EXPORT NativeTextButton : public TextButton {
398 public: 398 public:
399 // The button's class name. 399 // The button's class name.
400 static const char kViewClassName[]; 400 static const char kViewClassName[];
401 401
402 NativeTextButton(ButtonListener* listener); 402 explicit NativeTextButton(ButtonListener* listener);
403 NativeTextButton(ButtonListener* listener, const string16& text); 403 NativeTextButton(ButtonListener* listener, const string16& text);
404 404
405 // Overridden from TextButton: 405 // Overridden from TextButton:
406 virtual gfx::Size GetMinimumSize() OVERRIDE; 406 virtual gfx::Size GetMinimumSize() OVERRIDE;
407
408 virtual std::string GetClassName() const OVERRIDE; 407 virtual std::string GetClassName() const OVERRIDE;
409 408
410 private: 409 private:
411 void Init(); 410 void Init();
412 411
413 // Overridden from View: 412 // Overridden from View:
414 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; 413 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
415 414
416 // Overridden from TextButton: 415 // Overridden from TextButton:
417 virtual void GetExtraParams( 416 virtual void GetExtraParams(
418 gfx::NativeTheme::ExtraParams* params) const OVERRIDE; 417 gfx::NativeTheme::ExtraParams* params) const OVERRIDE;
419 418
420 DISALLOW_COPY_AND_ASSIGN(NativeTextButton); 419 DISALLOW_COPY_AND_ASSIGN(NativeTextButton);
421 }; 420 };
422 421
423 } // namespace views 422 } // namespace views
424 423
425 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 424 #endif // UI_VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view_unittest.cc ('k') | ui/views/controls/combobox/native_combobox_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698