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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
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 namespace aura_shell {
13 namespace internal {
14
15 LauncherView::LauncherView()
16 : ALLOW_THIS_IN_INITIALIZER_LIST(chrome_button_(new LauncherButton(this))),
17 ALLOW_THIS_IN_INITIALIZER_LIST(
18 applist_button_(new LauncherButton(this))) {
19 AddChildView(chrome_button_);
20 AddChildView(applist_button_);
21 }
22 LauncherView::~LauncherView() {
tfarina 2011/09/16 16:28:43 add a blank line between 21-22?
23 }
24
25 void LauncherView::Layout() {
26 }
27
28 void LauncherView::OnPaint(gfx::Canvas* canvas) {
29 canvas->FillRectInt(SK_ColorRED, 0, 0, width(), height());
30 }
31
32 void LauncherView::ButtonPressed(views::Button* sender,
33 const views::Event& event) {
34 }
35
36 views::Widget* CreateLauncher() {
tfarina 2011/09/16 16:28:43 Include ui/aura_shell/shell_factory.h for this?
37 views::Widget* launcher_widget = new views::Widget;
38 views::Widget::InitParams params2(views::Widget::InitParams::TYPE_CONTROL);
39 params2.bounds = gfx::Rect(0, 0, 300, 64);
40 params2.parent = aura::Desktop::GetInstance()->window();
41 LauncherView* launcher_view = new LauncherView;
42 params2.delegate = launcher_view;
43 launcher_widget->Init(params2);
44 launcher_widget->SetContentsView(launcher_view);
45 launcher_widget->Show();
46 return launcher_widget;
47 }
48
49 } // namespace internal
50 } // namespace aura_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698