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 aa808acadcb1f439f215433e0b6c20423b88ab77..32e2ba82fc4f8d34faac92d66c61769fa106709c 100644 |
| --- a/ui/views/controls/tabbed_pane/tabbed_pane.h |
| +++ b/ui/views/controls/tabbed_pane/tabbed_pane.h |
| @@ -34,9 +34,6 @@ class VIEWS_EXPORT TabbedPane : public View { |
| // Returns the number of tabs. |
| int GetTabCount(); |
| - // Returns the contents of the selected tab or NULL if there is none. |
| - View* GetSelectedTab(); |
| - |
| // Adds a new tab at the end of this TabbedPane with the specified |title|. |
| // |contents| is the view displayed when the tab is selected and is owned by |
| // the TabbedPane. |
| @@ -57,18 +54,34 @@ class VIEWS_EXPORT TabbedPane : public View { |
| gfx::Size GetPreferredSize() const override; |
| const char* GetClassName() const override; |
| + // Returns the content View of the currently selected Tab. |
| + View* GetSelectedTabViewForTesting(); |
|
sky
2016/10/05 20:00:22
I'm not a fan of ForTesting public functions. They
Elly Fong-Jones
2016/10/06 16:15:30
Done.
|
| + |
| + // Gets the currently selected Tab (returned as a View, because the Tab class |
| + // is private). |
| + View* GetSelectedTabForTesting(); |
| + |
| private: |
| friend class TabStrip; |
| // Get the Tab (the tabstrip view, not its content) at the valid |index|. |
| Tab* GetTabAt(int index); |
| + // Get the Tab (the tabstrip view, not its content) at the selected index. |
| + Tab* GetSelectedTab(); |
| + |
| + // Moves the selection by |delta| tabs, where negative delta means leftwards |
| + // and positive delta means rightwards. Returns whether the selection could be |
| + // moved by that amount; the only way this can fail is if there is only one |
| + // tab. |
| + bool MoveSelectionBy(int delta); |
| + |
| // Overridden from View: |
| void Layout() override; |
| void ViewHierarchyChanged( |
| const ViewHierarchyChangedDetails& details) override; |
| bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| - void OnFocus() override; |
| + bool OnKeyPressed(const ui::KeyEvent& event) override; |
| void GetAccessibleState(ui::AXViewState* state) override; |
| // A listener notified when tab selection changes. Weak, not owned. |