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

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

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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
OLDNEW
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 "ash/shelf/shelf_util.h" 7 #include "ash/shelf/shelf_util.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"
(...skipping 13 matching lines...) Expand all
24 namespace { 24 namespace {
25 25
26 std::string GetAppShelfId(AppWindow* app_window) { 26 std::string GetAppShelfId(AppWindow* app_window) {
27 if (app_window->window_type_is_panel()) 27 if (app_window->window_type_is_panel())
28 return base::StringPrintf("panel:%d", app_window->session_id().id()); 28 return base::StringPrintf("panel:%d", app_window->session_id().id());
29 return app_window->extension_id(); 29 return app_window->extension_id();
30 } 30 }
31 31
32 bool ControlsWindow(aura::Window* window) { 32 bool ControlsWindow(aura::Window* window) {
33 return chrome::GetHostDesktopTypeForNativeWindow(window) == 33 return chrome::GetHostDesktopTypeForNativeWindow(window) ==
34 chrome::HOST_DESKTOP_TYPE_ASH; 34 ui::HOST_DESKTOP_TYPE_ASH;
35 } 35 }
36 36
37 } // namespace 37 } // namespace
38 38
39 AppWindowLauncherController::AppWindowLauncherController( 39 AppWindowLauncherController::AppWindowLauncherController(
40 ChromeLauncherController* owner) 40 ChromeLauncherController* owner)
41 : owner_(owner), activation_client_(NULL) { 41 : owner_(owner), activation_client_(NULL) {
42 AppWindowRegistry* registry = AppWindowRegistry::Get(owner->profile()); 42 AppWindowRegistry* registry = AppWindowRegistry::Get(owner->profile());
43 registry_.insert(registry); 43 registry_.insert(registry);
44 registry->AddObserver(this); 44 registry->AddObserver(this);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 WindowToAppShelfIdMap::iterator iter1 = 235 WindowToAppShelfIdMap::iterator iter1 =
236 window_to_app_shelf_id_map_.find(window); 236 window_to_app_shelf_id_map_.find(window);
237 if (iter1 == window_to_app_shelf_id_map_.end()) 237 if (iter1 == window_to_app_shelf_id_map_.end())
238 return NULL; 238 return NULL;
239 std::string app_shelf_id = iter1->second; 239 std::string app_shelf_id = iter1->second;
240 AppControllerMap::iterator iter2 = app_controller_map_.find(app_shelf_id); 240 AppControllerMap::iterator iter2 = app_controller_map_.find(app_shelf_id);
241 if (iter2 == app_controller_map_.end()) 241 if (iter2 == app_controller_map_.end())
242 return NULL; 242 return NULL;
243 return iter2->second; 243 return iter2->second;
244 } 244 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698