Commit 9e5b66dc authored by tfarina@chromium.org's avatar tfarina@chromium.org

views: Get rid of TabbedPane::CreateWrapper().

This is called only once, better to inline it in the call site, less code.

R=sky@chromium.org

Review URL: http://codereview.chromium.org/7981019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102111 0039d316-1c4b-4281-b951-d872f2087c98
parent 12bc28fc
...@@ -71,10 +71,6 @@ gfx::Size TabbedPane::GetPreferredSize() { ...@@ -71,10 +71,6 @@ gfx::Size TabbedPane::GetPreferredSize() {
native_tabbed_pane_->GetPreferredSize() : gfx::Size(); native_tabbed_pane_->GetPreferredSize() : gfx::Size();
} }
void TabbedPane::CreateWrapper() {
native_tabbed_pane_ = NativeTabbedPaneWrapper::CreateNativeWrapper(this);
}
void TabbedPane::LoadAccelerators() { void TabbedPane::LoadAccelerators() {
// Ctrl+Shift+Tab // Ctrl+Shift+Tab
AddAccelerator(views::Accelerator(ui::VKEY_TAB, true, true, false)); AddAccelerator(views::Accelerator(ui::VKEY_TAB, true, true, false));
...@@ -89,7 +85,9 @@ void TabbedPane::Layout() { ...@@ -89,7 +85,9 @@ void TabbedPane::Layout() {
void TabbedPane::ViewHierarchyChanged(bool is_add, View* parent, View* child) { void TabbedPane::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
if (is_add && !native_tabbed_pane_) { if (is_add && !native_tabbed_pane_) {
CreateWrapper(); // The native wrapper's lifetime will be managed by the view hierarchy after
// we call AddChildView.
native_tabbed_pane_ = NativeTabbedPaneWrapper::CreateNativeWrapper(this);
AddChildView(native_tabbed_pane_->GetView()); AddChildView(native_tabbed_pane_->GetView());
LoadAccelerators(); LoadAccelerators();
} }
......
...@@ -75,9 +75,6 @@ class VIEWS_EXPORT TabbedPane : public View { ...@@ -75,9 +75,6 @@ class VIEWS_EXPORT TabbedPane : public View {
// The tabbed-pane's class name. // The tabbed-pane's class name.
static const char kViewClassName[]; static const char kViewClassName[];
// Creates the native wrapper.
void CreateWrapper();
// We support Ctrl+Tab and Ctrl+Shift+Tab to navigate tabbed option pages. // We support Ctrl+Tab and Ctrl+Shift+Tab to navigate tabbed option pages.
void LoadAccelerators(); void LoadAccelerators();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment