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

Unified Diff: ui/views/controls/tabbed_pane/tabbed_pane.h

Issue 2368283002: views: add focus to TabbedPane (Closed)
Patch Set: Created 4 years, 3 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
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..6cbfa694df8729035a4698d2a7aa8e829b5c6922 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.
@@ -63,12 +60,23 @@ class VIEWS_EXPORT TabbedPane : public View {
// 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;
+ bool OnKeyPressed(const ui::KeyEvent& event) override;
void OnFocus() override;
+ void OnBlur() override;
void GetAccessibleState(ui::AXViewState* state) override;
// A listener notified when tab selection changes. Weak, not owned.
« no previous file with comments | « no previous file | ui/views/controls/tabbed_pane/tabbed_pane.cc » ('j') | ui/views/controls/tabbed_pane/tabbed_pane.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698