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

Unified Diff: views/controls/tabbed_pane/native_tabbed_pane_gtk.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
===================================================================
--- views/controls/tabbed_pane/native_tabbed_pane_gtk.cc (revision 85284)
+++ views/controls/tabbed_pane/native_tabbed_pane_gtk.cc (working copy)
@@ -77,8 +77,8 @@
GtkWidget* page =
gtk_notebook_get_nth_page(GTK_NOTEBOOK(native_view()), index);
- WidgetGtk* widget =
- static_cast<WidgetGtk*>(NativeWidget::GetNativeWidgetForNativeView(page));
+ Widget* widget =
+ NativeWidget::GetNativeWidgetForNativeView(page)->GetWidget();
// detach the content view from widget so that we can delete widget
// without destroying the content view.
@@ -154,7 +154,7 @@
int tab_count = GetTabCount();
DCHECK(index <= tab_count);
- Widget* page_container = Widget::CreateWidget();
+ Widget* page_container = new Widget;
page_container->Init(
Widget::InitParams(Widget::InitParams::TYPE_CONTROL));
page_container->SetContentsView(contents);
@@ -195,18 +195,18 @@
GetRootView()->Layout();
}
-WidgetGtk* NativeTabbedPaneGtk::GetWidgetAt(int index) {
+Widget* NativeTabbedPaneGtk::GetWidgetAt(int index) {
DCHECK(index <= GetTabCount());
GtkWidget* page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(native_view()),
index);
- WidgetGtk* widget =
- static_cast<WidgetGtk*>(NativeWidget::GetNativeWidgetForNativeView(page));
+ Widget* widget =
+ NativeWidget::GetNativeWidgetForNativeView(page)->GetWidget();
DCHECK(widget);
return widget;
}
View* NativeTabbedPaneGtk::GetTabViewAt(int index) {
- WidgetGtk* widget = GetWidgetAt(index);
+ Widget* widget = GetWidgetAt(index);
DCHECK(widget && widget->GetRootView()->child_count() == 1);
return widget->GetRootView()->GetChildViewAt(0);
}
« no previous file with comments | « views/controls/tabbed_pane/native_tabbed_pane_gtk.h ('k') | views/controls/tabbed_pane/native_tabbed_pane_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698