Index: ui/aura_shell/launcher/launcher_view.cc |
=================================================================== |
--- ui/aura_shell/launcher/launcher_view.cc (revision 0) |
+++ ui/aura_shell/launcher/launcher_view.cc (revision 0) |
@@ -0,0 +1,50 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// 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/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" |
+ |
+namespace aura_shell { |
+namespace internal { |
+ |
+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() { |
tfarina
2011/09/16 16:28:43
add a blank line between 21-22?
|
+} |
+ |
+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() { |
tfarina
2011/09/16 16:28:43
Include ui/aura_shell/shell_factory.h for this?
|
+ 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; |
+} |
+ |
+} // namespace internal |
+} // namespace aura_shell |
Property changes on: ui\aura_shell\launcher\launcher_view.cc |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |