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

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

Issue 8926004: Revert 114095 - Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
Property Changes:
Added: svn:mergeinfo
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/root_window.h" 10 #include "ui/aura/root_window.h"
11 #include "ui/aura_shell/examples/toplevel_window.h" 11 #include "ui/aura_shell/examples/toplevel_window.h"
12 #include "ui/aura_shell/launcher/launcher_types.h" 12 #include "ui/aura_shell/launcher/launcher_types.h"
13 #include "ui/aura_shell/shell.h" 13 #include "ui/aura_shell/shell.h"
14 #include "ui/aura_shell/shell_delegate.h" 14 #include "ui/aura_shell/shell_delegate.h"
15 #include "ui/aura_shell/shell_factory.h" 15 #include "ui/aura_shell/shell_factory.h"
16 #include "ui/aura_shell/window_util.h"
17 #include "ui/base/resource/resource_bundle.h" 16 #include "ui/base/resource/resource_bundle.h"
18 #include "ui/base/ui_base_paths.h" 17 #include "ui/base/ui_base_paths.h"
19 #include "ui/gfx/canvas.h" 18 #include "ui/gfx/canvas.h"
20 #include "ui/gfx/compositor/test/compositor_test_support.h" 19 #include "ui/gfx/compositor/test/compositor_test_support.h"
21 #include "ui/views/widget/widget.h" 20 #include "ui/views/widget/widget.h"
22 #include "ui/views/widget/widget_delegate.h" 21 #include "ui/views/widget/widget_delegate.h"
23 22
24 namespace { 23 namespace {
25 24
26 class AppListWindow : public views::WidgetDelegateView { 25 class AppListWindow : public views::WidgetDelegateView {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 67 }
69 68
70 virtual void RequestAppListWidget( 69 virtual void RequestAppListWidget(
71 const gfx::Rect& bounds, 70 const gfx::Rect& bounds,
72 const SetWidgetCallback& callback) OVERRIDE { 71 const SetWidgetCallback& callback) OVERRIDE {
73 callback.Run(AppListWindow::Create(bounds)); 72 callback.Run(AppListWindow::Create(bounds));
74 } 73 }
75 74
76 virtual void LauncherItemClicked( 75 virtual void LauncherItemClicked(
77 const aura_shell::LauncherItem& item) OVERRIDE { 76 const aura_shell::LauncherItem& item) OVERRIDE {
78 aura_shell::ActivateWindow(item.window); 77 item.window->Activate();
79 } 78 }
80 79
81 virtual bool ConfigureLauncherItem(aura_shell::LauncherItem* item) OVERRIDE { 80 virtual bool ConfigureLauncherItem(aura_shell::LauncherItem* item) OVERRIDE {
82 static int image_count = 0; 81 static int image_count = 0;
83 item->tab_images.resize(image_count + 1); 82 item->tab_images.resize(image_count + 1);
84 for (int i = 0; i < image_count + 1; ++i) { 83 for (int i = 0; i < image_count + 1; ++i) {
85 item->tab_images[i].image.setConfig(SkBitmap::kARGB_8888_Config, 16, 16); 84 item->tab_images[i].image.setConfig(SkBitmap::kARGB_8888_Config, 16, 16);
86 item->tab_images[i].image.allocPixels(); 85 item->tab_images[i].image.allocPixels();
87 item->tab_images[i].image.eraseARGB(255, 86 item->tab_images[i].image.eraseARGB(255,
88 i == 0 ? 255 : 0, 87 i == 0 ? 255 : 0,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 aura::RootWindow::GetInstance()->Run(); 124 aura::RootWindow::GetInstance()->Run();
126 125
127 aura_shell::Shell::DeleteInstance(); 126 aura_shell::Shell::DeleteInstance();
128 127
129 aura::RootWindow::DeleteInstance(); 128 aura::RootWindow::DeleteInstance();
130 129
131 ui::CompositorTestSupport::Terminate(); 130 ui::CompositorTestSupport::Terminate();
132 131
133 return 0; 132 return 0;
134 } 133 }
OLDNEW
« no previous file with comments | « ui/aura_shell/default_container_layout_manager.cc ('k') | ui/aura_shell/modal_container_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698