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 13 matching lines...) Expand all Loading... |
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 Loading... |
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 } |
OLD | NEW |