summaryrefslogtreecommitdiffstats
path: root/ui/views/controls
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 17:02:46 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 17:02:46 +0000
commit3c4fc697e388737de181ed3b43c933b47815c317 (patch)
tree9fe58b68820ef194cda6a8279084634260dd679a /ui/views/controls
parent98953b1f14763e23fa0b83fa53f01806b5bd5d87 (diff)
downloadchromium_src-3c4fc697e388737de181ed3b43c933b47815c317.zip
chromium_src-3c4fc697e388737de181ed3b43c933b47815c317.tar.gz
chromium_src-3c4fc697e388737de181ed3b43c933b47815c317.tar.bz2
views: Mark single-argument constructors as explicit.
This was reported by cpplint as: python ~/depot_tools/cpplint.py $(find ui/views/ -type f -name \*.cc) 2>&1 | grep -v "Done processing" | grep explicit R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10358013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls')
-rw-r--r--ui/views/controls/button/text_button.h5
-rw-r--r--ui/views/controls/combobox/native_combobox_views_unittest.cc2
-rw-r--r--ui/views/controls/menu/menu_model_adapter_unittest.cc7
-rw-r--r--ui/views/controls/menu/native_menu_win.cc2
-rw-r--r--ui/views/controls/scrollbar/scroll_bar.h4
-rw-r--r--ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc7
-rw-r--r--ui/views/controls/throbber.h2
7 files changed, 15 insertions, 14 deletions
diff --git a/ui/views/controls/button/text_button.h b/ui/views/controls/button/text_button.h
index 3d84dc0..e4e218f 100644
--- a/ui/views/controls/button/text_button.h
+++ b/ui/views/controls/button/text_button.h
@@ -92,7 +92,7 @@ class VIEWS_EXPORT TextButtonBorder : public Border {
////////////////////////////////////////////////////////////////////////////////
class VIEWS_EXPORT TextButtonNativeThemeBorder : public Border {
public:
- TextButtonNativeThemeBorder(NativeThemeDelegate* delegate);
+ explicit TextButtonNativeThemeBorder(NativeThemeDelegate* delegate);
virtual ~TextButtonNativeThemeBorder();
// Implementation of Border:
@@ -399,12 +399,11 @@ class VIEWS_EXPORT NativeTextButton : public TextButton {
// The button's class name.
static const char kViewClassName[];
- NativeTextButton(ButtonListener* listener);
+ explicit NativeTextButton(ButtonListener* listener);
NativeTextButton(ButtonListener* listener, const string16& text);
// Overridden from TextButton:
virtual gfx::Size GetMinimumSize() OVERRIDE;
-
virtual std::string GetClassName() const OVERRIDE;
private:
diff --git a/ui/views/controls/combobox/native_combobox_views_unittest.cc b/ui/views/controls/combobox/native_combobox_views_unittest.cc
index a3924d5..d3d5811 100644
--- a/ui/views/controls/combobox/native_combobox_views_unittest.cc
+++ b/ui/views/controls/combobox/native_combobox_views_unittest.cc
@@ -18,7 +18,7 @@ namespace {
// OnKeyReleased() methods.
class TestCombobox : public views::Combobox {
public:
- TestCombobox(ui::ComboboxModel* model)
+ explicit TestCombobox(ui::ComboboxModel* model)
: Combobox(model),
key_handled_(false),
key_received_(false) {
diff --git a/ui/views/controls/menu/menu_model_adapter_unittest.cc b/ui/views/controls/menu/menu_model_adapter_unittest.cc
index 4b35883..ba6d406 100644
--- a/ui/views/controls/menu/menu_model_adapter_unittest.cc
+++ b/ui/views/controls/menu/menu_model_adapter_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -24,8 +24,9 @@ const int kFirstItemIndex = 25;
class MenuModelBase : public ui::MenuModel {
public:
- MenuModelBase(int command_id_base) : command_id_base_(command_id_base),
- last_activation_(-1) {
+ explicit MenuModelBase(int command_id_base)
+ : command_id_base_(command_id_base),
+ last_activation_(-1) {
}
virtual ~MenuModelBase() {
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index 7df8c8c..3af5ca0 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -74,7 +74,7 @@ static NativeMenuWin* GetNativeMenuWinFromHMENU(HMENU hmenu) {
// structure we have constructed in NativeMenuWin.
class NativeMenuWin::MenuHostWindow {
public:
- MenuHostWindow(NativeMenuWin* parent) : parent_(parent) {
+ explicit MenuHostWindow(NativeMenuWin* parent) : parent_(parent) {
RegisterClass();
hwnd_ = CreateWindowEx(l10n_util::GetExtendedStyles(), kWindowClassName,
L"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
diff --git a/ui/views/controls/scrollbar/scroll_bar.h b/ui/views/controls/scrollbar/scroll_bar.h
index 1ed3d5c..52bbb17 100644
--- a/ui/views/controls/scrollbar/scroll_bar.h
+++ b/ui/views/controls/scrollbar/scroll_bar.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -92,7 +92,7 @@ class VIEWS_EXPORT ScrollBar : public View {
// Create new scrollbar, either horizontal or vertical. These are protected
// since you need to be creating either a NativeScrollBar or a
// BitmapScrollBar.
- ScrollBar(bool is_horiz);
+ explicit ScrollBar(bool is_horiz);
private:
const bool is_horiz_;
diff --git a/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc b/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
index e209c8b..310b122 100644
--- a/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
+++ b/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -15,10 +15,11 @@ namespace views {
// A view for testing that takes a fixed preferred size upon construction.
class FixedSizeView : public View {
public:
- FixedSizeView(const gfx::Size& size)
+ explicit FixedSizeView(const gfx::Size& size)
: size_(size) {}
- virtual gfx::Size GetPreferredSize() {
+ // Overridden from View:
+ virtual gfx::Size GetPreferredSize() OVERRIDE {
return size_;
}
diff --git a/ui/views/controls/throbber.h b/ui/views/controls/throbber.h
index d0b436b..aeb1d9b 100644
--- a/ui/views/controls/throbber.h
+++ b/ui/views/controls/throbber.h
@@ -62,7 +62,7 @@ class VIEWS_EXPORT Throbber : public View {
// a small amount of work time has passed.
class VIEWS_EXPORT SmoothedThrobber : public Throbber {
public:
- SmoothedThrobber(int frame_delay_ms);
+ explicit SmoothedThrobber(int frame_delay_ms);
SmoothedThrobber(int frame_delay_ms, SkBitmap* frames);
virtual ~SmoothedThrobber();