| Index: ui/views/controls/tabbed_pane/tabbed_pane.cc
|
| diff --git a/ui/views/controls/tabbed_pane/tabbed_pane.cc b/ui/views/controls/tabbed_pane/tabbed_pane.cc
|
| index 9d07c6bdbf855a3be4d78dbc30919e5d09c3148b..bbf341b3c86bbd0fc2d95c65d226305d8de33a73 100644
|
| --- a/ui/views/controls/tabbed_pane/tabbed_pane.cc
|
| +++ b/ui/views/controls/tabbed_pane/tabbed_pane.cc
|
| @@ -34,6 +34,9 @@ const char TabbedPane::kViewClassName[] = "TabbedPane";
|
| // The tab view shown in the tab strip.
|
| class Tab : public View {
|
| public:
|
| + // Internal class name.
|
| + static const char kViewClassName[];
|
| +
|
| Tab(TabbedPane* tabbed_pane, const base::string16& title, View* contents);
|
| ~Tab() override;
|
|
|
| @@ -49,6 +52,7 @@ class Tab : public View {
|
| void OnGestureEvent(ui::GestureEvent* event) override;
|
| gfx::Size GetPreferredSize() const override;
|
| void Layout() override;
|
| + const char* GetClassName() const override;
|
|
|
| private:
|
| enum TabState {
|
| @@ -72,12 +76,16 @@ class Tab : public View {
|
| // The tab strip shown above the tab contents.
|
| class TabStrip : public View {
|
| public:
|
| + // Internal class name.
|
| + static const char kViewClassName[];
|
| +
|
| explicit TabStrip(TabbedPane* tabbed_pane);
|
| ~TabStrip() override;
|
|
|
| // Overridden from View:
|
| gfx::Size GetPreferredSize() const override;
|
| void Layout() override;
|
| + const char* GetClassName() const override;
|
| void OnPaint(gfx::Canvas* canvas) override;
|
|
|
| private:
|
| @@ -86,6 +94,9 @@ class TabStrip : public View {
|
| DISALLOW_COPY_AND_ASSIGN(TabStrip);
|
| };
|
|
|
| +// static
|
| +const char Tab::kViewClassName[] = "Tab";
|
| +
|
| Tab::Tab(TabbedPane* tabbed_pane, const base::string16& title, View* contents)
|
| : tabbed_pane_(tabbed_pane),
|
| title_(new Label(title,
|
| @@ -155,6 +166,10 @@ void Tab::Layout() {
|
| title_->SetBoundsRect(bounds);
|
| }
|
|
|
| +const char* Tab::GetClassName() const {
|
| + return kViewClassName;
|
| +}
|
| +
|
| void Tab::SetState(TabState tab_state) {
|
| if (tab_state == tab_state_)
|
| return;
|
| @@ -178,6 +193,9 @@ void Tab::SetState(TabState tab_state) {
|
| SchedulePaint();
|
| }
|
|
|
| +// static
|
| +const char TabStrip::kViewClassName[] = "TabStrip";
|
| +
|
| TabStrip::TabStrip(TabbedPane* tabbed_pane) : tabbed_pane_(tabbed_pane) {}
|
|
|
| TabStrip::~TabStrip() {}
|
| @@ -202,6 +220,10 @@ void TabStrip::Layout() {
|
| }
|
| }
|
|
|
| +const char* TabStrip::GetClassName() const {
|
| + return kViewClassName;
|
| +}
|
| +
|
| void TabStrip::OnPaint(gfx::Canvas* canvas) {
|
| OnPaintBackground(canvas);
|
|
|
|
|