| 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/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "chrome/browser/chromeos/arc/arc_util.h" | 9 #include "chrome/browser/chromeos/arc/arc_util.h" |
| 10 #include "chrome/browser/extensions/extension_app_icon_loader.h" | 10 #include "chrome/browser/extensions/extension_app_icon_loader.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 ChromeLauncherController::~ChromeLauncherController() { | 24 ChromeLauncherController::~ChromeLauncherController() { |
| 25 if (instance_ == this) | 25 if (instance_ == this) |
| 26 instance_ = nullptr; | 26 instance_ = nullptr; |
| 27 } | 27 } |
| 28 | 28 |
| 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, shelf_controller_.associated_group()); | 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::AppLauncherId id, |
| 40 ash::LaunchSource source, | 40 ash::LaunchSource 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 } |
| (...skipping 138 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 |