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

Side by Side Diff: ash/shell/shell_main.cc

Issue 9113045: Reworks the workspace code. Here's the new heuristics: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged and all that good stuff. Created 8 years, 11 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 | « ash/ash.gyp ('k') | ash/wm/show_state_controller.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/launcher/launcher_model.h" 8 #include "ash/launcher/launcher_model.h"
9 #include "ash/launcher/launcher_types.h" 9 #include "ash/launcher/launcher_types.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 aura::Window* default_container = ash::Shell::GetInstance()->GetContainer( 150 aura::Window* default_container = ash::Shell::GetInstance()->GetContainer(
151 ash::internal::kShellWindowId_DefaultContainer); 151 ash::internal::kShellWindowId_DefaultContainer);
152 std::vector<aura::Window*> windows = default_container->children(); 152 std::vector<aura::Window*> windows = default_container->children();
153 // Window cycling expects the topmost window at the front of the list. 153 // Window cycling expects the topmost window at the front of the list.
154 std::reverse(windows.begin(), windows.end()); 154 std::reverse(windows.begin(), windows.end());
155 return windows; 155 return windows;
156 } 156 }
157 157
158 virtual void LauncherItemClicked( 158 virtual void LauncherItemClicked(
159 const ash::LauncherItem& item) OVERRIDE { 159 const ash::LauncherItem& item) OVERRIDE {
160 ash::ActivateWindow(watcher_->GetWindowByID(item.id)); 160 aura::Window* window = watcher_->GetWindowByID(item.id);
161 window->Show();
162 ash::ActivateWindow(window);
161 } 163 }
162 164
163 virtual int GetBrowserShortcutResourceId() OVERRIDE { 165 virtual int GetBrowserShortcutResourceId() OVERRIDE {
164 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; 166 return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT;
165 } 167 }
166 168
167 virtual string16 GetLauncherItemTitle( 169 virtual string16 GetLauncherItemTitle(
168 const ash::LauncherItem& item) OVERRIDE { 170 const ash::LauncherItem& item) OVERRIDE {
169 return watcher_->GetWindowByID(item.id)->title(); 171 return watcher_->GetWindowByID(item.id)->title();
170 } 172 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 window_watcher.reset(); 217 window_watcher.reset();
216 218
217 ash::Shell::DeleteInstance(); 219 ash::Shell::DeleteInstance();
218 220
219 aura::RootWindow::DeleteInstance(); 221 aura::RootWindow::DeleteInstance();
220 222
221 ui::CompositorTestSupport::Terminate(); 223 ui::CompositorTestSupport::Terminate();
222 224
223 return 0; 225 return 0;
224 } 226 }
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/wm/show_state_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698