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

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

Issue 12225042: Remove NativeTabbedPane[Win|Wrapper]; promote Views impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore FocusManagerDtorTest to non-aura; fix comment. Created 7 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WRAPPER_H_
6 #define UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WRAPPER_H_
7
8 #include "base/string16.h"
9 #include "ui/gfx/native_widget_types.h"
10
11 namespace gfx {
12 class Size;
13 }
14
15 namespace views {
16
17 class View;
18
19 // An interface implemented by an object that provides a platform-native
20 // tabbed-pane.
21 class NativeTabbedPaneWrapper {
22 public:
23 // The TabbedPane calls this when it is destroyed to clean up the wrapper
24 // object.
25 virtual ~NativeTabbedPaneWrapper() {}
26
27 // Adds a new tab at the end of this TabbedPane with the specified |title|.
28 // |contents| is the view displayed when the tab is selected and is owned by
29 // the TabbedPane.
30 virtual void AddTab(const string16& title, View* contents) = 0;
31
32 // Adds a new tab at the specified |index| with the specified |title|.
33 // |contents| is the view displayed when the tab is selected and is owned by
34 // the TabbedPane. If |select_if_first_tab| is true and the tabbed pane is
35 // currently empty, the new tab is selected. If you pass in false for
36 // |select_if_first_tab| you need to explicitly invoke SelectTabAt, otherwise
37 // the tabbed pane will not have a valid selection.
38 virtual void AddTabAtIndex(int index,
39 const string16& title,
40 View* contents,
41 bool select_if_first_tab) = 0;
42
43 // Removes the tab at the specified |index| and returns the associated content
44 // view. The caller becomes the owner of the returned view.
45 virtual View* RemoveTabAtIndex(int index) = 0;
46
47 // Selects the tab at the specified |index|, which must be valid.
48 virtual void SelectTabAt(int index) = 0;
49
50 // Returns the number of tabs.
51 virtual int GetTabCount() = 0;
52
53 // Returns the index of the selected tab.
54 virtual int GetSelectedTabIndex() = 0;
55
56 // Returns the contents of the selected tab.
57 virtual View* GetSelectedTab() = 0;
58
59 // Retrieves the views::View that hosts the native control.
60 virtual View* GetView() = 0;
61
62 // Sets the focus to the tabbed pane native view.
63 virtual void SetFocus() = 0;
64
65 // Gets the preferred size of the tabbed pane.
66 virtual gfx::Size GetPreferredSize() = 0;
67
68 // Returns a handle to the underlying native view for testing.
69 virtual gfx::NativeView GetTestingHandle() const = 0;
70 };
71
72 } // namespace views
73
74 #endif // UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698