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

Unified Diff: ui/aura_shell/launcher/launcher_view.cc

Issue 7903018: More shell content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
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

Powered by Google App Engine
This is Rietveld 408576698