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

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: Incorporated feedback and fixed bugs 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 // static 105 // static
106 void LauncherIconUpdater::ActivateByID(ash::LauncherID id) { 106 void LauncherIconUpdater::ActivateByID(ash::LauncherID id) {
107 TabContentsWrapper* tab = NULL; 107 TabContentsWrapper* tab = NULL;
108 const LauncherIconUpdater* updater = GetLauncherByID(id, &tab); 108 const LauncherIconUpdater* updater = GetLauncherByID(id, &tab);
109 if (!updater) { 109 if (!updater) {
110 NOTREACHED(); 110 NOTREACHED();
111 return; 111 return;
112 } 112 }
113 updater->window_->Show();
113 ash::ActivateWindow(updater->window_); 114 ash::ActivateWindow(updater->window_);
114 if (tab) { 115 if (tab) {
115 updater->tab_model_->ActivateTabAt( 116 updater->tab_model_->ActivateTabAt(
116 updater->tab_model_->GetIndexOfTabContents(tab), true); 117 updater->tab_model_->GetIndexOfTabContents(tab), true);
117 } 118 }
118 } 119 }
119 120
120 // static 121 // static
121 string16 LauncherIconUpdater::GetTitleByID(ash::LauncherID id) { 122 string16 LauncherIconUpdater::GetTitleByID(ash::LauncherID id) {
122 TabContentsWrapper* tab = NULL; 123 TabContentsWrapper* tab = NULL;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 return true; 391 return true;
391 for (AppTabMap::const_iterator i = app_map_.begin(); i != app_map_.end(); 392 for (AppTabMap::const_iterator i = app_map_.begin(); i != app_map_.end();
392 ++i) { 393 ++i) {
393 if (i->second.id == id) { 394 if (i->second.id == id) {
394 *tab = i->first; 395 *tab = i->first;
395 return true; 396 return true;
396 } 397 }
397 } 398 }
398 return false; 399 return false;
399 } 400 }
OLDNEW
« ash/wm/workspace/workspace_manager_unittest.cc ('K') | « ash/wm/workspace_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698