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/ash/launcher/shell_window_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_controller.h" |
6 | 6 |
7 #include "apps/shell_window.h" | 7 #include "apps/shell_window.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
13 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h
" | 13 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h
" |
14 #include "chrome/browser/ui/host_desktop.h" | 14 #include "chrome/browser/ui/host_desktop.h" |
15 #include "ui/aura/client/activation_client.h" | 15 #include "ui/aura/client/activation_client.h" |
| 16 #include "ui/aura/root_window.h" |
16 | 17 |
17 using apps::ShellWindow; | 18 using apps::ShellWindow; |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 std::string GetAppLauncherId(ShellWindow* shell_window) { | 22 std::string GetAppLauncherId(ShellWindow* shell_window) { |
22 if (shell_window->window_type_is_panel()) | 23 if (shell_window->window_type_is_panel()) |
23 return base::StringPrintf("panel:%d", shell_window->session_id().id()); | 24 return base::StringPrintf("panel:%d", shell_window->session_id().id()); |
24 return shell_window->extension()->id(); | 25 return shell_window->extension()->id(); |
25 } | 26 } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 WindowToAppLauncherIdMap::iterator iter1 = | 179 WindowToAppLauncherIdMap::iterator iter1 = |
179 window_to_app_launcher_id_map_.find(window); | 180 window_to_app_launcher_id_map_.find(window); |
180 if (iter1 == window_to_app_launcher_id_map_.end()) | 181 if (iter1 == window_to_app_launcher_id_map_.end()) |
181 return NULL; | 182 return NULL; |
182 std::string app_launcher_id = iter1->second; | 183 std::string app_launcher_id = iter1->second; |
183 AppControllerMap::iterator iter2 = app_controller_map_.find(app_launcher_id); | 184 AppControllerMap::iterator iter2 = app_controller_map_.find(app_launcher_id); |
184 if (iter2 == app_controller_map_.end()) | 185 if (iter2 == app_controller_map_.end()) |
185 return NULL; | 186 return NULL; |
186 return iter2->second; | 187 return iter2->second; |
187 } | 188 } |
OLD | NEW |