OLD | NEW |
1 // Copyright (c) 2011 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_NATIVE_TABBED_PANE_WRAPPER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WRAPPER_H_ |
6 #define UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WRAPPER_H_ | 6 #define UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WRAPPER_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
11 namespace gfx { | 11 namespace gfx { |
12 class Size; | 12 class Size; |
13 } | 13 } |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 | 16 |
17 class TabbedPane; | |
18 class View; | 17 class View; |
19 | 18 |
20 // An interface implemented by an object that provides a platform-native | 19 // An interface implemented by an object that provides a platform-native |
21 // tabbed-pane. | 20 // tabbed-pane. |
22 class NativeTabbedPaneWrapper { | 21 class NativeTabbedPaneWrapper { |
23 public: | 22 public: |
24 // The TabbedPane calls this when it is destroyed to clean up the wrapper | 23 // The TabbedPane calls this when it is destroyed to clean up the wrapper |
25 // object. | 24 // object. |
26 virtual ~NativeTabbedPaneWrapper() {} | 25 virtual ~NativeTabbedPaneWrapper() {} |
27 | 26 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual View* GetView() = 0; | 60 virtual View* GetView() = 0; |
62 | 61 |
63 // Sets the focus to the tabbed pane native view. | 62 // Sets the focus to the tabbed pane native view. |
64 virtual void SetFocus() = 0; | 63 virtual void SetFocus() = 0; |
65 | 64 |
66 // Gets the preferred size of the tabbed pane. | 65 // Gets the preferred size of the tabbed pane. |
67 virtual gfx::Size GetPreferredSize() = 0; | 66 virtual gfx::Size GetPreferredSize() = 0; |
68 | 67 |
69 // Returns a handle to the underlying native view for testing. | 68 // Returns a handle to the underlying native view for testing. |
70 virtual gfx::NativeView GetTestingHandle() const = 0; | 69 virtual gfx::NativeView GetTestingHandle() const = 0; |
71 | |
72 // Creates an appropriate NativeTabbedPaneWrapper for the platform. | |
73 static NativeTabbedPaneWrapper* CreateNativeWrapper(TabbedPane* tabbed_pane); | |
74 }; | 70 }; |
75 | 71 |
76 } // namespace views | 72 } // namespace views |
77 | 73 |
78 #endif // UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WRAPPER_H_ | 74 #endif // UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WRAPPER_H_ |
OLD | NEW |