Index: chrome/browser/chromeos/notifications/notification_panel.cc |
=================================================================== |
--- chrome/browser/chromeos/notifications/notification_panel.cc (revision 85284) |
+++ chrome/browser/chromeos/notifications/notification_panel.cc (working copy) |
@@ -72,8 +72,7 @@ |
// renderer's native gtk widgets are moved one by one via |
// View::VisibleBoundsInRootChanged() notification, which makes scrolling not |
// smooth. |
-// TODO: this should subclass Widget and not WidgetGtk. |
-class ViewportWidget : public views::WidgetGtk { |
+class ViewportWidget : public views::Widget { |
public: |
explicit ViewportWidget(chromeos::NotificationPanel* panel) |
: panel_(panel), |
@@ -425,7 +424,7 @@ |
void NotificationPanel::Show() { |
if (!panel_widget_) { |
- panel_widget_ = views::Widget::CreateWidget(); |
+ panel_widget_ = new views::Widget; |
// TODO(oshima): Using window because Popup widget behaves weird |
// when resizing. This needs to be investigated. |
Widget::InitParams params(Widget::InitParams::TYPE_WINDOW); |
@@ -447,15 +446,15 @@ |
panel_widget_->SetContentsView(scroll_view_.get()); |
// Add the view port after scroll_view is attached to the panel widget. |
- ViewportWidget* widget = new ViewportWidget(this); |
- container_host_ = widget; |
+ ViewportWidget* viewport_widget = new ViewportWidget(this); |
+ container_host_ = viewport_widget; |
container_host_->Init( |
views::Widget::InitParams(views::Widget::InitParams::TYPE_CONTROL)); |
container_host_->SetContentsView(balloon_container_.get()); |
// The window_contents_ is onwed by the Widget. Increase ref count |
// so that window_contents does not get deleted when detached. |
- g_object_ref(widget->window_contents()); |
- native->Attach(widget->window_contents()); |
+ g_object_ref(viewport_widget->GetNativeView()); |
+ native->Attach(viewport_widget->GetNativeView()); |
UnregisterNotification(); |
panel_controller_.reset( |