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

Unified Diff: ui/views/controls/button/checkbox.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/button/button.cc ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/checkbox.h
diff --git a/ui/views/controls/button/checkbox.h b/ui/views/controls/button/checkbox.h
deleted file mode 100644
index 8f473fa279d5523a258f98c5e456b4bee2cd9eab..0000000000000000000000000000000000000000
--- a/ui/views/controls/button/checkbox.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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.
-
-#ifndef UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
-#define UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
-
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "base/strings/string16.h"
-#include "ui/views/controls/button/label_button.h"
-
-namespace views {
-
-// A native themed class representing a checkbox. This class does not use
-// platform specific objects to replicate the native platforms looks and feel.
-class VIEWS_EXPORT Checkbox : public LabelButton {
- public:
- static const char kViewClassName[];
-
- explicit Checkbox(const base::string16& label);
- virtual ~Checkbox();
-
- // Sets a listener for this checkbox. Checkboxes aren't required to have them
- // since their state can be read independently of them being toggled.
- void set_listener(ButtonListener* listener) { listener_ = listener; }
-
- // Sets/Gets whether or not the checkbox is checked.
- virtual void SetChecked(bool checked);
- bool checked() const { return checked_; }
-
- protected:
- // Overridden from LabelButton:
- virtual void Layout() override;
- virtual const char* GetClassName() const override;
- virtual void GetAccessibleState(ui::AXViewState* state) override;
- virtual void OnFocus() override;
- virtual void OnBlur() override;
- virtual const gfx::ImageSkia& GetImage(ButtonState for_state) override;
-
- // Set the image shown for each button state depending on whether it is
- // [checked] or [focused].
- void SetCustomImage(bool checked,
- bool focused,
- ButtonState for_state,
- const gfx::ImageSkia& image);
-
- private:
- // Overridden from Button:
- virtual void NotifyClick(const ui::Event& event) override;
-
- virtual ui::NativeTheme::Part GetThemePart() const override;
- virtual void GetExtraParams(
- ui::NativeTheme::ExtraParams* params) const override;
-
- // True if the checkbox is checked.
- bool checked_;
-
- // The images for each button state.
- gfx::ImageSkia images_[2][2][STATE_COUNT];
-
- DISALLOW_COPY_AND_ASSIGN(Checkbox);
-};
-
-} // namespace views
-
-#endif // UI_VIEWS_CONTROLS_BUTTON_CHECKBOX_H_
« no previous file with comments | « ui/views/controls/button/button.cc ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698