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

Unified Diff: chrome/browser/chromeos/notifications/notification_panel.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: 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(
« no previous file with comments | « chrome/browser/chromeos/notifications/balloon_view.cc ('k') | chrome/browser/chromeos/panels/panel_scroller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698