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

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 v5 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 12 matching lines...) Expand all
23 if (instance_ == this) 23 if (instance_ == this)
24 instance_ = nullptr; 24 instance_ = nullptr;
25 } 25 }
26 26
27 void ChromeLauncherController::LaunchApp(const std::string& app_id, 27 void ChromeLauncherController::LaunchApp(const std::string& app_id,
28 ash::LaunchSource source, 28 ash::LaunchSource source,
29 int event_flags) { 29 int event_flags) {
30 launcher_controller_helper_->LaunchApp(app_id, source, event_flags); 30 launcher_controller_helper_->LaunchApp(app_id, source, event_flags);
31 } 31 }
32 32
33 void ChromeLauncherController::LaunchAppWithLaunchId(
34 const std::string& app_id,
35 const std::string& launch_id,
36 ash::LaunchSource source,
37 int event_flags) {
38 launcher_controller_helper_->LaunchAppWithLaunchId(app_id, launch_id, source,
39 event_flags);
40 }
41
33 ChromeLauncherController::ChromeLauncherController() : observer_binding_(this) { 42 ChromeLauncherController::ChromeLauncherController() : observer_binding_(this) {
34 DCHECK(!instance_); 43 DCHECK(!instance_);
35 instance_ = this; 44 instance_ = this;
36 // Start observing the shelf controller immediately. 45 // Start observing the shelf controller immediately.
37 if (ConnectToShelfController()) { 46 if (ConnectToShelfController()) {
38 ash::mojom::ShelfObserverAssociatedPtrInfo ptr_info; 47 ash::mojom::ShelfObserverAssociatedPtrInfo ptr_info;
39 observer_binding_.Bind(&ptr_info, shelf_controller_.associated_group()); 48 observer_binding_.Bind(&ptr_info, shelf_controller_.associated_group());
40 shelf_controller_->AddObserver(std::move(ptr_info)); 49 shelf_controller_->AddObserver(std::move(ptr_info));
41 } 50 }
42 } 51 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // TODO(msw): Avoid handling this pref change and forwarding the value to ash. 182 // TODO(msw): Avoid handling this pref change and forwarding the value to ash.
174 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id, 183 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id,
175 auto_hide); 184 auto_hide);
176 } 185 }
177 186
178 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id, 187 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id,
179 const gfx::ImageSkia& image) { 188 const gfx::ImageSkia& image) {
180 // Implemented by subclasses; this should not be called. 189 // Implemented by subclasses; this should not be called.
181 NOTREACHED(); 190 NOTREACHED();
182 } 191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698