Chromium Code Reviews| Index: ui/views/controls/tabbed_pane/tabbed_pane.h |
| diff --git a/ui/views/controls/tabbed_pane/tabbed_pane.h b/ui/views/controls/tabbed_pane/tabbed_pane.h |
| index 4ff3c6922bd1c88733c943f7e2fa833d70e1e662..0209fe9c35047eab7ed2d2915bddc4496cad3cd7 100644 |
| --- a/ui/views/controls/tabbed_pane/tabbed_pane.h |
| +++ b/ui/views/controls/tabbed_pane/tabbed_pane.h |
| @@ -15,7 +15,38 @@ namespace views { |
| class Label; |
| class Tab; |
| class TabbedPaneListener; |
| -class TabStrip; |
| + |
| +namespace test { |
| +class TabbedPaneAccessibilityMacTest; |
| +class TabbedPaneTest; |
| +} |
| + |
| +// The tab strip shown above the tab contents. |
| +class TabStrip : public View { |
|
tapted
2017/01/12 16:33:55
nit: move this down, after the declaration for `cl
Patti Lor
2017/01/13 05:48:38
Done, also added forward declaration for its use i
|
| + public: |
| + // Internal class name. |
| + static const char kViewClassName[]; |
| + |
| + TabStrip(); |
| + ~TabStrip() override; |
| + |
| + // Called by TabStrip when the selected tab changes. This function is only |
| + // called if |from_tab| is not null, i.e., there was a previously selected |
| + // tab. |
| + virtual void OnSelectedTabChanged(Tab* from_tab, Tab* to_tab); |
| + |
| + // Overridden from View: |
| + const char* GetClassName() const override; |
| + void OnPaintBorder(gfx::Canvas* canvas) override; |
| + |
| + Tab* GetSelectedTab() const; |
| + Tab* GetTabAtDeltaFromSelected(int delta) const; |
| + Tab* GetTabAtIndex(int index) const; |
| + int GetSelectedTabIndex() const; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(TabStrip); |
| +}; |
| // TabbedPane is a view that shows tabs. When the user clicks on a tab, the |
| // associated view is displayed. |
| @@ -61,11 +92,8 @@ class VIEWS_EXPORT TabbedPane : public View { |
| friend class FocusTraversalTest; |
| friend class Tab; |
| friend class TabStrip; |
| - FRIEND_TEST_ALL_PREFIXES(TabbedPaneTest, AddAndSelect); |
| - FRIEND_TEST_ALL_PREFIXES(TabbedPaneTest, ArrowKeyBindings); |
| - |
| - // Get the Tab (the tabstrip view, not its content) at the valid |index|. |
| - Tab* GetTabAt(int index); |
|
tapted
2017/01/12 16:33:55
@sky: this was an orphaned declaration. Friended t
sky
2017/01/12 16:39:21
I'm ok with exposing the declaration.
Patti Lor
2017/01/13 05:48:38
Thanks Trent and sky, leaving as-is then :)
|
| + friend class test::TabbedPaneTest; |
| + friend class test::TabbedPaneAccessibilityMacTest; |
| // Get the Tab (the tabstrip view, not its content) at the selected index. |
| Tab* GetSelectedTab(); |
| @@ -121,6 +149,8 @@ class Tab : public View { |
| void OnGestureEvent(ui::GestureEvent* event) override; |
| gfx::Size GetPreferredSize() const override; |
| const char* GetClassName() const override; |
| + void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| + bool HandleAccessibleAction(const ui::AXActionData& action_data) override; |
| void OnFocus() override; |
| void OnBlur() override; |
| bool OnKeyPressed(const ui::KeyEvent& event) override; |