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

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

Issue 7890054: Adds code for a new Aura shell. (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
« no previous file with comments | « ui/aura_shell/launcher/launcher_view.h ('k') | ui/aura_shell/launcher_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+}
« no previous file with comments | « ui/aura_shell/launcher/launcher_view.h ('k') | ui/aura_shell/launcher_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698