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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura_shell/launcher_view.h" 5 #include "ui/aura_shell/launcher/launcher_view.h"
6
7 #include "ui/aura/desktop.h"
8 #include "ui/aura_shell/launcher/launcher_button.h"
9 #include "ui/gfx/canvas.h"
10 #include "views/widget/widget.h"
11
12 LauncherView::LauncherView()
13 : ALLOW_THIS_IN_INITIALIZER_LIST(chrome_button_(new LauncherButton(this))),
14 ALLOW_THIS_IN_INITIALIZER_LIST(
15 applist_button_(new LauncherButton(this))) {
16 AddChildView(chrome_button_);
17 AddChildView(applist_button_);
18 }
19 LauncherView::~LauncherView() {
20 }
21
22 void LauncherView::Layout() {
23 }
24
25 void LauncherView::OnPaint(gfx::Canvas* canvas) {
26 canvas->FillRectInt(SK_ColorRED, 0, 0, width(), height());
27 }
28
29 void LauncherView::ButtonPressed(views::Button* sender,
30 const views::Event& event) {
31 }
32
33 views::Widget* CreateLauncher() {
34 views::Widget* launcher_widget = new views::Widget;
35 views::Widget::InitParams params2(views::Widget::InitParams::TYPE_CONTROL);
36 params2.bounds = gfx::Rect(0, 0, 300, 64);
37 params2.parent = aura::Desktop::GetInstance()->window();
38 LauncherView* launcher_view = new LauncherView;
39 params2.delegate = launcher_view;
40 launcher_widget->Init(params2);
41 launcher_widget->SetContentsView(launcher_view);
42 launcher_widget->Show();
43 return launcher_widget;
44 }
OLDNEW
« 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