OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/app_window_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" |
6 | 6 |
7 #include "apps/app_window.h" | 7 #include "apps/app_window.h" |
8 #include "ash/shelf/shelf_util.h" | 8 #include "ash/shelf/shelf_util.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" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" | 13 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" |
14 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 14 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
15 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 15 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
16 #include "chrome/browser/ui/host_desktop.h" | 16 #include "chrome/browser/ui/host_desktop.h" |
17 #include "extensions/common/extension.h" | 17 #include "extensions/common/extension.h" |
18 #include "ui/aura/client/activation_client.h" | 18 #include "ui/aura/client/activation_client.h" |
19 #include "ui/aura/root_window.h" | 19 #include "ui/aura/window_event_dispatcher.h" |
20 | 20 |
21 using apps::AppWindow; | 21 using apps::AppWindow; |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 std::string GetAppShelfId(AppWindow* app_window) { | 25 std::string GetAppShelfId(AppWindow* app_window) { |
26 if (app_window->window_type_is_panel()) | 26 if (app_window->window_type_is_panel()) |
27 return base::StringPrintf("panel:%d", app_window->session_id().id()); | 27 return base::StringPrintf("panel:%d", app_window->session_id().id()); |
28 return app_window->extension()->id(); | 28 return app_window->extension()->id(); |
29 } | 29 } |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 WindowToAppShelfIdMap::iterator iter1 = | 220 WindowToAppShelfIdMap::iterator iter1 = |
221 window_to_app_shelf_id_map_.find(window); | 221 window_to_app_shelf_id_map_.find(window); |
222 if (iter1 == window_to_app_shelf_id_map_.end()) | 222 if (iter1 == window_to_app_shelf_id_map_.end()) |
223 return NULL; | 223 return NULL; |
224 std::string app_shelf_id = iter1->second; | 224 std::string app_shelf_id = iter1->second; |
225 AppControllerMap::iterator iter2 = app_controller_map_.find(app_shelf_id); | 225 AppControllerMap::iterator iter2 = app_controller_map_.find(app_shelf_id); |
226 if (iter2 == app_controller_map_.end()) | 226 if (iter2 == app_controller_map_.end()) |
227 return NULL; | 227 return NULL; |
228 return iter2->second; | 228 return iter2->second; |
229 } | 229 } |
OLD | NEW |