| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VIEWS_CONTROLS_TABBED_PANE_H_ | 5 #ifndef VIEWS_CONTROLS_TABBED_PANE_H_ |
| 6 #define VIEWS_CONTROLS_TABBED_PANE_H_ | 6 #define VIEWS_CONTROLS_TABBED_PANE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 // The object that actually implements the tabbed-pane. | 70 // The object that actually implements the tabbed-pane. |
| 71 // Protected for tests access. | 71 // Protected for tests access. |
| 72 NativeTabbedPaneWrapper* native_tabbed_pane_; | 72 NativeTabbedPaneWrapper* native_tabbed_pane_; |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 // The tabbed-pane's class name. | 75 // The tabbed-pane's class name. |
| 76 static const char kViewClassName[]; | 76 static const char kViewClassName[]; |
| 77 | 77 |
| 78 // Creates the native wrapper. | |
| 79 void CreateWrapper(); | |
| 80 | |
| 81 // We support Ctrl+Tab and Ctrl+Shift+Tab to navigate tabbed option pages. | 78 // We support Ctrl+Tab and Ctrl+Shift+Tab to navigate tabbed option pages. |
| 82 void LoadAccelerators(); | 79 void LoadAccelerators(); |
| 83 | 80 |
| 84 // View: | 81 // View: |
| 85 virtual void Layout() OVERRIDE; | 82 virtual void Layout() OVERRIDE; |
| 86 virtual void ViewHierarchyChanged(bool is_add, | 83 virtual void ViewHierarchyChanged(bool is_add, |
| 87 View* parent, | 84 View* parent, |
| 88 View* child) OVERRIDE; | 85 View* child) OVERRIDE; |
| 89 // Handles Ctrl+Tab and Ctrl+Shift+Tab navigation of pages. | 86 // Handles Ctrl+Tab and Ctrl+Shift+Tab navigation of pages. |
| 90 virtual bool AcceleratorPressed( | 87 virtual bool AcceleratorPressed( |
| 91 const views::Accelerator& accelerator) OVERRIDE; | 88 const views::Accelerator& accelerator) OVERRIDE; |
| 92 virtual std::string GetClassName() const OVERRIDE; | 89 virtual std::string GetClassName() const OVERRIDE; |
| 93 virtual void OnFocus() OVERRIDE; | 90 virtual void OnFocus() OVERRIDE; |
| 94 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 91 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
| 95 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 92 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 96 | 93 |
| 97 // The listener we notify about tab selection changes. | 94 // The listener we notify about tab selection changes. |
| 98 TabbedPaneListener* listener_; | 95 TabbedPaneListener* listener_; |
| 99 | 96 |
| 100 // The accessible name of this view. | 97 // The accessible name of this view. |
| 101 string16 accessible_name_; | 98 string16 accessible_name_; |
| 102 | 99 |
| 103 DISALLOW_COPY_AND_ASSIGN(TabbedPane); | 100 DISALLOW_COPY_AND_ASSIGN(TabbedPane); |
| 104 }; | 101 }; |
| 105 | 102 |
| 106 } // namespace views | 103 } // namespace views |
| 107 | 104 |
| 108 #endif // VIEWS_CONTROLS_TABBED_PANE_H_ | 105 #endif // VIEWS_CONTROLS_TABBED_PANE_H_ |
| OLD | NEW |