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

Unified Diff: ash/system/tray/system_tray_widget_delegate.cc

Issue 10140017: ash: Some code-cleanup in the system-tray code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« ash/shell.cc ('K') | « ash/system/tray/system_tray_widget_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_widget_delegate.cc
diff --git a/ash/status_area/status_area_view.cc b/ash/system/tray/system_tray_widget_delegate.cc
similarity index 67%
rename from ash/status_area/status_area_view.cc
rename to ash/system/tray/system_tray_widget_delegate.cc
index 7e1478f40dd74701b8d56e57c61a652fed87d2e1..acc937a90a41635c74d82764af2a79e6cd69d18a 100644
--- a/ash/status_area/status_area_view.cc
+++ b/ash/system/tray/system_tray_widget_delegate.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/status_area/status_area_view.h"
+#include "ash/system/tray/system_tray_widget_delegate.h"
#include "ash/ash_export.h"
#include "ash/focus_cycler.h"
@@ -65,29 +65,5 @@ bool StatusAreaView::CanActivate() const {
void StatusAreaView::DeleteDelegate() {
}
-ASH_EXPORT views::Widget* CreateStatusArea(views::View* contents) {
- if (!contents) {
- contents = new views::View;
- contents->set_focusable(true);
- }
- StatusAreaView* status_area_view = new StatusAreaView;
- views::Widget* widget = new views::Widget;
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- 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(
- ash::internal::kShellWindowId_StatusContainer);
- params.transparent = true;
- widget->Init(params);
- widget->set_focus_on_creation(false);
- status_area_view->AddChildView(contents);
- widget->SetContentsView(status_area_view);
- widget->Show();
- widget->GetNativeView()->SetName("StatusAreaView");
- return widget;
-}
-
} // namespace internal
} // namespace ash
« ash/shell.cc ('K') | « ash/system/tray/system_tray_widget_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698