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

Side by Side Diff: ui/aura_shell/examples/aura_shell_main.cc

Issue 8747021: [Aura] Polish app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: set tile-page-scrollbar color Created 9 years 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/app_list.cc ('k') | ui/aura_shell/shell_delegate.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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/i18n/icu_util.h" 7 #include "base/i18n/icu_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "ui/aura/desktop.h" 10 #include "ui/aura/desktop.h"
(...skipping 10 matching lines...) Expand all
21 #include "ui/views/widget/widget_delegate.h" 21 #include "ui/views/widget/widget_delegate.h"
22 22
23 namespace { 23 namespace {
24 24
25 class AppListWindow : public views::WidgetDelegateView { 25 class AppListWindow : public views::WidgetDelegateView {
26 public: 26 public:
27 AppListWindow() { 27 AppListWindow() {
28 } 28 }
29 29
30 // static 30 // static
31 static views::Widget* Create() { 31 static views::Widget* Create(const gfx::Rect& bounds) {
32 AppListWindow* app_list = new AppListWindow; 32 AppListWindow* app_list = new AppListWindow;
33 33
34 views::Widget::InitParams widget_params( 34 views::Widget::InitParams widget_params(
35 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 35 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
36 widget_params.bounds = bounds;
36 widget_params.delegate = app_list; 37 widget_params.delegate = app_list;
37 widget_params.keep_on_top = true; 38 widget_params.keep_on_top = true;
38 widget_params.transparent = true; 39 widget_params.transparent = true;
39 40
40 views::Widget* widget = new views::Widget; 41 views::Widget* widget = new views::Widget;
41 widget->Init(widget_params); 42 widget->Init(widget_params);
42 widget->SetContentsView(app_list); 43 widget->SetContentsView(app_list);
43 return widget; 44 return widget;
44 } 45 }
45 46
(...skipping 13 matching lines...) Expand all
59 create_params.can_resize = true; 60 create_params.can_resize = true;
60 create_params.can_maximize = true; 61 create_params.can_maximize = true;
61 aura_shell::examples::ToplevelWindow::CreateToplevelWindow(create_params); 62 aura_shell::examples::ToplevelWindow::CreateToplevelWindow(create_params);
62 } 63 }
63 64
64 virtual views::Widget* CreateStatusArea() OVERRIDE { 65 virtual views::Widget* CreateStatusArea() OVERRIDE {
65 return aura_shell::internal::CreateStatusArea(); 66 return aura_shell::internal::CreateStatusArea();
66 } 67 }
67 68
68 virtual void RequestAppListWidget( 69 virtual void RequestAppListWidget(
70 const gfx::Rect& bounds,
69 const SetWidgetCallback& callback) OVERRIDE { 71 const SetWidgetCallback& callback) OVERRIDE {
70 callback.Run(AppListWindow::Create()); 72 callback.Run(AppListWindow::Create(bounds));
71 } 73 }
72 74
73 virtual void LauncherItemClicked( 75 virtual void LauncherItemClicked(
74 const aura_shell::LauncherItem& item) OVERRIDE { 76 const aura_shell::LauncherItem& item) OVERRIDE {
75 item.window->Activate(); 77 item.window->Activate();
76 } 78 }
77 79
78 virtual bool ConfigureLauncherItem(aura_shell::LauncherItem* item) OVERRIDE { 80 virtual bool ConfigureLauncherItem(aura_shell::LauncherItem* item) OVERRIDE {
79 static int image_count = 0; 81 static int image_count = 0;
80 item->tab_images.resize(image_count + 1); 82 item->tab_images.resize(image_count + 1);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 aura_shell::examples::InitWindowTypeLauncher(); 122 aura_shell::examples::InitWindowTypeLauncher();
121 123
122 aura::Desktop::GetInstance()->Run(); 124 aura::Desktop::GetInstance()->Run();
123 125
124 aura::Desktop::DeleteInstance(); 126 aura::Desktop::DeleteInstance();
125 127
126 ui::CompositorTestSupport::Terminate(); 128 ui::CompositorTestSupport::Terminate();
127 129
128 return 0; 130 return 0;
129 } 131 }
OLDNEW
« no previous file with comments | « ui/aura_shell/app_list.cc ('k') | ui/aura_shell/shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698