Index: ui/aura_shell/launcher/launcher_view.cc |
=================================================================== |
--- ui/aura_shell/launcher/launcher_view.cc (revision 0) |
+++ ui/aura_shell/launcher/launcher_view.cc (working copy) |
@@ -2,4 +2,43 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "ui/aura_shell/launcher_view.h" |
+#include "ui/aura_shell/launcher/launcher_view.h" |
+ |
+#include "ui/aura/desktop.h" |
+#include "ui/aura_shell/launcher/launcher_button.h" |
+#include "ui/gfx/canvas.h" |
+#include "views/widget/widget.h" |
+ |
+LauncherView::LauncherView() |
+ : ALLOW_THIS_IN_INITIALIZER_LIST(chrome_button_(new LauncherButton(this))), |
+ ALLOW_THIS_IN_INITIALIZER_LIST( |
+ applist_button_(new LauncherButton(this))) { |
+ AddChildView(chrome_button_); |
+ AddChildView(applist_button_); |
+} |
+LauncherView::~LauncherView() { |
+} |
+ |
+void LauncherView::Layout() { |
+} |
+ |
+void LauncherView::OnPaint(gfx::Canvas* canvas) { |
+ canvas->FillRectInt(SK_ColorRED, 0, 0, width(), height()); |
+} |
+ |
+void LauncherView::ButtonPressed(views::Button* sender, |
+ const views::Event& event) { |
+} |
+ |
+views::Widget* CreateLauncher() { |
+ views::Widget* launcher_widget = new views::Widget; |
+ views::Widget::InitParams params2(views::Widget::InitParams::TYPE_CONTROL); |
+ params2.bounds = gfx::Rect(0, 0, 300, 64); |
+ params2.parent = aura::Desktop::GetInstance()->window(); |
+ LauncherView* launcher_view = new LauncherView; |
+ params2.delegate = launcher_view; |
+ launcher_widget->Init(params2); |
+ launcher_widget->SetContentsView(launcher_view); |
+ launcher_widget->Show(); |
+ return launcher_widget; |
+} |