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 "ash/public/interfaces/constants.mojom.h" | 7 #include "ash/public/interfaces/constants.mojom.h" |
8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "chrome/browser/chromeos/arc/arc_util.h" | 10 #include "chrome/browser/chromeos/arc/arc_util.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void ChromeLauncherController::Init() { | 29 void ChromeLauncherController::Init() { |
30 // Start observing the shelf controller. | 30 // Start observing the shelf controller. |
31 if (ConnectToShelfController()) { | 31 if (ConnectToShelfController()) { |
32 ash::mojom::ShelfObserverAssociatedPtrInfo ptr_info; | 32 ash::mojom::ShelfObserverAssociatedPtrInfo ptr_info; |
33 observer_binding_.Bind(&ptr_info); | 33 observer_binding_.Bind(&ptr_info); |
34 shelf_controller_->AddObserver(std::move(ptr_info)); | 34 shelf_controller_->AddObserver(std::move(ptr_info)); |
35 } | 35 } |
36 OnInit(); | 36 OnInit(); |
37 } | 37 } |
38 | 38 |
39 void ChromeLauncherController::LaunchApp(ash::AppLauncherId id, | 39 void ChromeLauncherController::LaunchApp(ash::AppLaunchId id, |
40 ash::ShelfLaunchSource source, | 40 ash::ShelfLaunchSource source, |
41 int event_flags) { | 41 int event_flags) { |
42 launcher_controller_helper_->LaunchApp(id, source, event_flags); | 42 launcher_controller_helper_->LaunchApp(id, source, event_flags); |
43 } | 43 } |
44 | 44 |
45 ChromeLauncherController::ChromeLauncherController() : observer_binding_(this) { | 45 ChromeLauncherController::ChromeLauncherController() : observer_binding_(this) { |
46 DCHECK(!instance_); | 46 DCHECK(!instance_); |
47 instance_ = this; | 47 instance_ = this; |
48 } | 48 } |
49 | 49 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // This will uselessly store a preference value for invalid display ids. | 182 // This will uselessly store a preference value for invalid display ids. |
183 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id, | 183 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id, |
184 auto_hide); | 184 auto_hide); |
185 } | 185 } |
186 | 186 |
187 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id, | 187 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id, |
188 const gfx::ImageSkia& image) { | 188 const gfx::ImageSkia& image) { |
189 // Implemented by subclasses; this should not be called. | 189 // Implemented by subclasses; this should not be called. |
190 NOTREACHED(); | 190 NOTREACHED(); |
191 } | 191 } |
OLD | NEW |