| OLD | NEW |
| 1 // Copyright (c) 2010 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_NATIVE_TABBED_PANE_WIN_H_ | 5 #ifndef VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_ |
| 6 #define VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_ | 6 #define VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "views/controls/native_control_win.h" | 11 #include "views/controls/native_control_win.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 42 virtual void CreateNativeControl(); | 42 virtual void CreateNativeControl(); |
| 43 virtual bool ProcessMessage(UINT message, | 43 virtual bool ProcessMessage(UINT message, |
| 44 WPARAM w_param, | 44 WPARAM w_param, |
| 45 LPARAM l_param, | 45 LPARAM l_param, |
| 46 LRESULT* result); | 46 LRESULT* result); |
| 47 | 47 |
| 48 // View overrides: | 48 // View overrides: |
| 49 virtual void Layout(); | 49 virtual void Layout(); |
| 50 virtual FocusTraversable* GetFocusTraversable(); | 50 virtual FocusTraversable* GetFocusTraversable(); |
| 51 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); | 51 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); |
| 52 | 52 virtual Widget* GetChildWidget(); |
| 53 // TODO(beng): this method should not be unix_hacker | |
| 54 virtual Widget* child_widget() { return content_window_; } | |
| 55 | 53 |
| 56 private: | 54 private: |
| 57 // Called upon creation of native control to initialize tabs that are added | 55 // Called upon creation of native control to initialize tabs that are added |
| 58 // before the native control is created. | 56 // before the native control is created. |
| 59 void InitializeTabs(); | 57 void InitializeTabs(); |
| 60 | 58 |
| 61 // Adds a tab with the given content to native control at the given index. | 59 // Adds a tab with the given content to native control at the given index. |
| 62 void AddNativeTab(int index, const std::wstring& title); | 60 void AddNativeTab(int index, const std::wstring& title); |
| 63 | 61 |
| 64 // Changes the contents view to the view associated with the tab at |index|. | 62 // Changes the contents view to the view associated with the tab at |index|. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 86 | 84 |
| 87 // The window displayed in the tab. | 85 // The window displayed in the tab. |
| 88 Widget* content_window_; | 86 Widget* content_window_; |
| 89 | 87 |
| 90 DISALLOW_COPY_AND_ASSIGN(NativeTabbedPaneWin); | 88 DISALLOW_COPY_AND_ASSIGN(NativeTabbedPaneWin); |
| 91 }; | 89 }; |
| 92 | 90 |
| 93 } // namespace views | 91 } // namespace views |
| 94 | 92 |
| 95 #endif // VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_ | 93 #endif // VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_WIN_H_ |
| OLD | NEW |