OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |