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

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

Issue 2523053004: Enhance chrome.app.window API for shelf integration with restore support (Closed)
Patch Set: Review v4 Created 4 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/extensions/extension_app_icon_loader.h" 8 #include "chrome/browser/extensions/extension_app_icon_loader.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" 10 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h"
(...skipping 13 matching lines...) Expand all
24 if (instance_ == this) 24 if (instance_ == this)
25 instance_ = nullptr; 25 instance_ = nullptr;
26 } 26 }
27 27
28 void ChromeLauncherController::LaunchApp(const std::string& app_id, 28 void ChromeLauncherController::LaunchApp(const std::string& app_id,
29 ash::LaunchSource source, 29 ash::LaunchSource source,
30 int event_flags) { 30 int event_flags) {
31 launcher_controller_helper_->LaunchApp(app_id, source, event_flags); 31 launcher_controller_helper_->LaunchApp(app_id, source, event_flags);
32 } 32 }
33 33
34 void ChromeLauncherController::LaunchAppWithLaunchId(
35 const std::string& app_id,
36 const std::string& launch_id,
37 ash::LaunchSource source,
38 int event_flags) {
39 launcher_controller_helper_->LaunchAppWithLaunchId(app_id, launch_id, source,
40 event_flags);
41 }
42
34 ChromeLauncherController::ChromeLauncherController() : observer_binding_(this) { 43 ChromeLauncherController::ChromeLauncherController() : observer_binding_(this) {
35 DCHECK(!instance_); 44 DCHECK(!instance_);
36 instance_ = this; 45 instance_ = this;
37 // Start observing the shelf controller immediately. 46 // Start observing the shelf controller immediately.
38 if (ConnectToShelfController()) { 47 if (ConnectToShelfController()) {
39 ash::mojom::ShelfObserverAssociatedPtrInfo ptr_info; 48 ash::mojom::ShelfObserverAssociatedPtrInfo ptr_info;
40 observer_binding_.Bind(&ptr_info, shelf_controller_.associated_group()); 49 observer_binding_.Bind(&ptr_info, shelf_controller_.associated_group());
41 shelf_controller_->AddObserver(std::move(ptr_info)); 50 shelf_controller_->AddObserver(std::move(ptr_info));
42 } 51 }
43 } 52 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // TODO(msw): Avoid handling this pref change and forwarding the value to ash. 189 // TODO(msw): Avoid handling this pref change and forwarding the value to ash.
181 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id, 190 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id,
182 auto_hide); 191 auto_hide);
183 } 192 }
184 193
185 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id, 194 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id,
186 const gfx::ImageSkia& image) { 195 const gfx::ImageSkia& image) {
187 // Implemented by subclasses; this should not be called. 196 // Implemented by subclasses; this should not be called.
188 NOTREACHED(); 197 NOTREACHED();
189 } 198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698