OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |