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

Side by Side Diff: ui/views/controls/tabbed_pane/tabbed_pane.h

Issue 10797046: (Views only): Allow choosing between NativeTabbedPaneView and NativeTabbedPaneWin on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Fix file header *sigh*" Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_ 5 #ifndef UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_
6 #define UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_ 6 #define UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 class NativeTabbedPaneWrapper; 15 class NativeTabbedPaneWrapper;
16 class TabbedPaneListener; 16 class TabbedPaneListener;
17 17
18 // TabbedPane is a view that shows tabs. When the user clicks on a tab, the 18 // TabbedPane is a view that shows tabs. When the user clicks on a tab, the
19 // associated view is displayed. 19 // associated view is displayed.
20 class VIEWS_EXPORT TabbedPane : public View { 20 class VIEWS_EXPORT TabbedPane : public View {
21 public: 21 public:
22 TabbedPane(); 22 TabbedPane();
23 virtual ~TabbedPane(); 23 virtual ~TabbedPane();
24 24
25 TabbedPaneListener* listener() const { return listener_; } 25 TabbedPaneListener* listener() const { return listener_; }
26 void set_listener(TabbedPaneListener* listener) { listener_ = listener; } 26 void set_listener(TabbedPaneListener* listener) { listener_ = listener; }
27 #if defined(OS_WIN) && !defined(USE_AURA)
28 bool use_native_win_control() { return use_native_win_control_; }
29 void set_use_native_win_control(bool use_native_win_control) {
30 use_native_win_control_ = use_native_win_control;
31 }
32 #endif
27 33
28 // Returns the number of tabs. 34 // Returns the number of tabs.
29 int GetTabCount(); 35 int GetTabCount();
30 36
31 // Returns the index of the selected tab. 37 // Returns the index of the selected tab.
32 int GetSelectedTabIndex(); 38 int GetSelectedTabIndex();
33 39
34 // Returns the contents of the selected tab. 40 // Returns the contents of the selected tab.
35 View* GetSelectedTab(); 41 View* GetSelectedTab();
36 42
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 virtual void ViewHierarchyChanged(bool is_add, 85 virtual void ViewHierarchyChanged(bool is_add,
80 View* parent, 86 View* parent,
81 View* child) OVERRIDE; 87 View* child) OVERRIDE;
82 // Handles Ctrl+Tab and Ctrl+Shift+Tab navigation of pages. 88 // Handles Ctrl+Tab and Ctrl+Shift+Tab navigation of pages.
83 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 89 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
84 virtual std::string GetClassName() const OVERRIDE; 90 virtual std::string GetClassName() const OVERRIDE;
85 virtual void OnFocus() OVERRIDE; 91 virtual void OnFocus() OVERRIDE;
86 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; 92 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
87 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 93 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
88 94
95 #if defined(OS_WIN) && !defined(USE_AURA)
96 bool use_native_win_control_;
97 #endif
98
89 // Our listener. Not owned. Notified when tab selection changes. 99 // Our listener. Not owned. Notified when tab selection changes.
90 TabbedPaneListener* listener_; 100 TabbedPaneListener* listener_;
91 101
92 // The accessible name of this tabbed pane. 102 // The accessible name of this tabbed pane.
93 string16 accessible_name_; 103 string16 accessible_name_;
94 104
95 DISALLOW_COPY_AND_ASSIGN(TabbedPane); 105 DISALLOW_COPY_AND_ASSIGN(TabbedPane);
96 }; 106 };
97 107
98 } // namespace views 108 } // namespace views
99 109
100 #endif // UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_ 110 #endif // UI_VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h ('k') | ui/views/controls/tabbed_pane/tabbed_pane.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698