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

Side by Side Diff: chrome/browser/chromeos/notifications/notification_panel.cc

Issue 8528014: Remove use_only_pure_views flag (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « build/common.gypi ('k') | views/widget/widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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 // Draws the view for the balloons. 5 // Draws the view for the balloons.
6 6
7 #include "chrome/browser/chromeos/notifications/notification_panel.h" 7 #include "chrome/browser/chromeos/notifications/notification_panel.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 panel_widget_->Init(params); 452 panel_widget_->Init(params);
453 // Set minimum bounds so that it can grow freely. 453 // Set minimum bounds so that it can grow freely.
454 gtk_widget_set_size_request(GTK_WIDGET(panel_widget_->GetNativeView()), 454 gtk_widget_set_size_request(GTK_WIDGET(panel_widget_->GetNativeView()),
455 min_bounds_.width(), min_bounds_.height()); 455 min_bounds_.width(), min_bounds_.height());
456 456
457 views::NativeViewHost* native = new views::NativeViewHost(); 457 views::NativeViewHost* native = new views::NativeViewHost();
458 scroll_view_->SetContents(native); 458 scroll_view_->SetContents(native);
459 459
460 panel_widget_->SetContentsView(scroll_view_.get()); 460 panel_widget_->SetContentsView(scroll_view_.get());
461 461
462 #if defined(USE_ONLY_PURE_VIEWS) 462 #if defined(USE_AURA) || defined(TOUCH_UI)
463 native->AttachToView(balloon_container_.get()); 463 native->AttachToView(balloon_container_.get());
464 #else 464 #else
465 // Add the view port after scroll_view is attached to the panel widget. 465 // Add the view port after scroll_view is attached to the panel widget.
466 ViewportWidget* viewport_widget = new ViewportWidget(this); 466 ViewportWidget* viewport_widget = new ViewportWidget(this);
467 container_host_ = viewport_widget; 467 container_host_ = viewport_widget;
468 container_host_->Init( 468 container_host_->Init(
469 views::Widget::InitParams(views::Widget::InitParams::TYPE_CONTROL)); 469 views::Widget::InitParams(views::Widget::InitParams::TYPE_CONTROL));
470 container_host_->SetContentsView(balloon_container_.get()); 470 container_host_->SetContentsView(balloon_container_.get());
471 // The window_contents_ is onwed by the Widget. Increase ref count 471 // The window_contents_ is onwed by the Widget. Increase ref count
472 // so that window_contents does not get deleted when detached. 472 // so that window_contents does not get deleted when detached.
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 &origin); 888 &origin);
889 return rect.Contains(gfx::Rect(origin, view->size())); 889 return rect.Contains(gfx::Rect(origin, view->size()));
890 } 890 }
891 891
892 892
893 bool NotificationPanelTester::IsActive(const BalloonViewImpl* view) const { 893 bool NotificationPanelTester::IsActive(const BalloonViewImpl* view) const {
894 return panel_->active_ == view; 894 return panel_->active_ == view;
895 } 895 }
896 896
897 } // namespace chromeos 897 } // namespace chromeos
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698