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

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

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address comments. Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/extension_app_window_launcher_controlle r.h" 5 #include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_controlle r.h"
6 6
7 #include "ash/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/shelf/shelf_delegate.h" 8 #include "ash/common/shelf/shelf_delegate.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window_property.h" 10 #include "ash/common/wm_window_property.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 std::string app_id = app_window->extension_id(); 46 std::string app_id = app_window->extension_id();
47 std::string launch_id = GetLaunchId(app_window); 47 std::string launch_id = GetLaunchId(app_window);
48 return app_id + launch_id; 48 return app_id + launch_id;
49 } 49 }
50 50
51 } // namespace 51 } // namespace
52 52
53 ExtensionAppWindowLauncherController::ExtensionAppWindowLauncherController( 53 ExtensionAppWindowLauncherController::ExtensionAppWindowLauncherController(
54 ChromeLauncherController* owner) 54 ChromeLauncherController* owner)
55 : AppWindowLauncherController(owner) { 55 : AppWindowLauncherController(owner) {
56 AppWindowRegistry* registry = AppWindowRegistry::Get(owner->GetProfile()); 56 AppWindowRegistry* registry = AppWindowRegistry::Get(owner->profile());
57 registry_.insert(registry); 57 registry_.insert(registry);
58 registry->AddObserver(this); 58 registry->AddObserver(this);
59 } 59 }
60 60
61 ExtensionAppWindowLauncherController::~ExtensionAppWindowLauncherController() { 61 ExtensionAppWindowLauncherController::~ExtensionAppWindowLauncherController() {
62 for (std::set<AppWindowRegistry*>::iterator it = registry_.begin(); 62 for (std::set<AppWindowRegistry*>::iterator it = registry_.begin();
63 it != registry_.end(); ++it) 63 it != registry_.end(); ++it)
64 (*it)->RemoveObserver(this); 64 (*it)->RemoveObserver(this);
65 65
66 for (WindowToAppShelfIdMap::iterator iter = 66 for (WindowToAppShelfIdMap::iterator iter =
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 WindowToAppShelfIdMap::iterator window_iter = 224 WindowToAppShelfIdMap::iterator window_iter =
225 window_to_app_shelf_id_map_.find(window); 225 window_to_app_shelf_id_map_.find(window);
226 if (window_iter == window_to_app_shelf_id_map_.end()) 226 if (window_iter == window_to_app_shelf_id_map_.end())
227 return nullptr; 227 return nullptr;
228 AppControllerMap::iterator app_controller_iter = 228 AppControllerMap::iterator app_controller_iter =
229 app_controller_map_.find(window_iter->second); 229 app_controller_map_.find(window_iter->second);
230 if (app_controller_iter == app_controller_map_.end()) 230 if (app_controller_iter == app_controller_map_.end())
231 return nullptr; 231 return nullptr;
232 return app_controller_iter->second; 232 return app_controller_iter->second;
233 } 233 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698