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

Side by Side Diff: chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc

Issue 16702003: Move ShellWindow into apps component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yar Created 7 years, 5 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/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 "ash/shell.h" 8 #include "ash/shell.h"
8 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
9 #include "base/stl_util.h" 10 #include "base/stl_util.h"
10 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
12 #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 "
13 #include "chrome/browser/ui/extensions/shell_window.h"
14 #include "ui/aura/client/activation_client.h" 14 #include "ui/aura/client/activation_client.h"
15 15
16 using apps::ShellWindow;
17
16 namespace { 18 namespace {
17 19
18 std::string GetAppLauncherId(ShellWindow* shell_window) { 20 std::string GetAppLauncherId(ShellWindow* shell_window) {
19 if (shell_window->window_type_is_panel()) 21 if (shell_window->window_type_is_panel())
20 return base::StringPrintf("panel:%d", shell_window->session_id().id()); 22 return base::StringPrintf("panel:%d", shell_window->session_id().id());
21 return shell_window->extension()->id(); 23 return shell_window->extension()->id();
22 } 24 }
23 25
24 } // namespace 26 } // namespace
25 27
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 WindowToAppLauncherIdMap::iterator iter1 = 167 WindowToAppLauncherIdMap::iterator iter1 =
166 window_to_app_launcher_id_map_.find(window); 168 window_to_app_launcher_id_map_.find(window);
167 if (iter1 == window_to_app_launcher_id_map_.end()) 169 if (iter1 == window_to_app_launcher_id_map_.end())
168 return NULL; 170 return NULL;
169 std::string app_launcher_id = iter1->second; 171 std::string app_launcher_id = iter1->second;
170 AppControllerMap::iterator iter2 = app_controller_map_.find(app_launcher_id); 172 AppControllerMap::iterator iter2 = app_controller_map_.find(app_launcher_id);
171 if (iter2 == app_controller_map_.end()) 173 if (iter2 == app_controller_map_.end())
172 return NULL; 174 return NULL;
173 return iter2->second; 175 return iter2->second;
174 } 176 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698