summaryrefslogtreecommitdiffstats
path: root/views/controls/separator.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-01 23:15:45 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-01 23:15:45 +0000
commitfa922b17ac56895da698ca72726e706948980960 (patch)
tree6cc1889000b443a15bfce8c9356794a10aa30dde /views/controls/separator.h
parentfc1ae90b61e9c3969e2df93d4e6e06c3efe4f9b8 (diff)
downloadchromium_src-fa922b17ac56895da698ca72726e706948980960.zip
chromium_src-fa922b17ac56895da698ca72726e706948980960.tar.gz
chromium_src-fa922b17ac56895da698ca72726e706948980960.tar.bz2
Make separator portable. Simpler than other native controls so no wrapper interface.
TEST=none BUG=none Review URL: http://codereview.chromium.org/118065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17368 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/separator.h')
-rw-r--r--views/controls/separator.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/views/controls/separator.h b/views/controls/separator.h
index 866beda..0988d62 100644
--- a/views/controls/separator.h
+++ b/views/controls/separator.h
@@ -5,30 +5,40 @@
#ifndef VIEWS_CONTROLS_SEPARATOR_H_
#define VIEWS_CONTROLS_SEPARATOR_H_
-#include "views/controls/native_control.h"
+#include <string>
+
+#include "views/view.h"
namespace views {
// The Separator class is a view that shows a line used to visually separate
// other views. The current implementation is only horizontal.
-class Separator : public NativeControl {
+class Separator : public View {
public:
+ // The separator's class name.
+ static const char kViewClassName[];
+
Separator();
virtual ~Separator();
- // NativeControl overrides:
- virtual HWND CreateNativeControl(HWND parent_container);
- virtual LRESULT OnNotify(int w_param, LPNMHDR l_param);
-
- // View overrides:
+ // Overridden from View:
+ virtual void Layout();
virtual gfx::Size GetPreferredSize();
+ protected:
+ virtual void ViewHierarchyChanged(bool is_add, View* parent,
+ View* child);
+ virtual std::string GetClassName() const;
private:
+ void CreateNativeWrapper();
+
+ // The native view.
+ View* native_wrapper_;
- DISALLOW_EVIL_CONSTRUCTORS(Separator);
+ DISALLOW_COPY_AND_ASSIGN(Separator);
};
} // namespace views
-#endif // #define VIEWS_CONTROLS_SEPARATOR_H_
+#endif // VIEWS_CONTROLS_SEPARATOR_H_