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

Unified Diff: ash/status_area/status_area_view.cc

Issue 9596002: ash uber tray: Make it work in ash_shell, and a couple more fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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
« no previous file with comments | « ash/shell_factory.h ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/status_area/status_area_view.cc
diff --git a/ash/status_area/status_area_view.cc b/ash/status_area/status_area_view.cc
index fe840d1f824835add6d2929d48e0a963efdbc2ff..fc4a8e0856484f0505178f4d58e3e16b04eb4c18 100644
--- a/ash/status_area/status_area_view.cc
+++ b/ash/status_area/status_area_view.cc
@@ -41,12 +41,14 @@ void StatusAreaView::OnPaint(gfx::Canvas* canvas) {
canvas->DrawBitmapInt(status_mock_, 0, 0);
}
-ASH_EXPORT views::Widget* CreateStatusArea() {
+ASH_EXPORT views::Widget* CreateStatusArea(views::View* contents) {
StatusAreaView* status_area_view = new StatusAreaView;
+ if (!contents)
+ contents = status_area_view;
views::Widget* widget = new views::Widget;
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- gfx::Size ps = status_area_view->GetPreferredSize();
+ gfx::Size ps = contents->GetPreferredSize();
params.bounds = gfx::Rect(0, 0, ps.width(), ps.height());
params.delegate = status_area_view;
params.parent = Shell::GetInstance()->GetContainer(
@@ -54,7 +56,7 @@ ASH_EXPORT views::Widget* CreateStatusArea() {
params.transparent = true;
widget->Init(params);
widget->set_focus_on_creation(false);
- widget->SetContentsView(status_area_view);
+ widget->SetContentsView(contents);
widget->Show();
widget->GetNativeView()->SetName("StatusAreaView");
return widget;
« no previous file with comments | « ash/shell_factory.h ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698