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

Side by Side Diff: chrome/browser/ui/views/aura/launcher_icon_updater.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/wm/workspace_controller_unittest.cc ('k') | no next file » | 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 "chrome/browser/ui/views/aura/launcher_icon_updater.h" 5 #include "chrome/browser/ui/views/aura/launcher_icon_updater.h"
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/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 // static 107 // static
108 void LauncherIconUpdater::ActivateByID(ash::LauncherID id) { 108 void LauncherIconUpdater::ActivateByID(ash::LauncherID id) {
109 TabContentsWrapper* tab = NULL; 109 TabContentsWrapper* tab = NULL;
110 const LauncherIconUpdater* updater = GetLauncherByID(id, &tab); 110 const LauncherIconUpdater* updater = GetLauncherByID(id, &tab);
111 if (!updater) { 111 if (!updater) {
112 NOTREACHED(); 112 NOTREACHED();
113 return; 113 return;
114 } 114 }
115 updater->window_->Show();
115 ash::ActivateWindow(updater->window_); 116 ash::ActivateWindow(updater->window_);
116 if (tab) { 117 if (tab) {
117 updater->tab_model_->ActivateTabAt( 118 updater->tab_model_->ActivateTabAt(
118 updater->tab_model_->GetIndexOfTabContents(tab), true); 119 updater->tab_model_->GetIndexOfTabContents(tab), true);
119 } 120 }
120 } 121 }
121 122
122 // static 123 // static
123 string16 LauncherIconUpdater::GetTitleByID(ash::LauncherID id) { 124 string16 LauncherIconUpdater::GetTitleByID(ash::LauncherID id) {
124 TabContentsWrapper* tab = NULL; 125 TabContentsWrapper* tab = NULL;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 return true; 393 return true;
393 for (AppTabMap::const_iterator i = app_map_.begin(); i != app_map_.end(); 394 for (AppTabMap::const_iterator i = app_map_.begin(); i != app_map_.end();
394 ++i) { 395 ++i) {
395 if (i->second.id == id) { 396 if (i->second.id == id) {
396 *tab = i->first; 397 *tab = i->first;
397 return true; 398 return true;
398 } 399 }
399 } 400 }
400 return false; 401 return false;
401 } 402 }
OLDNEW
« no previous file with comments | « ash/wm/workspace_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698