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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 2684723003: Remove LauncherItemController::Launch, cleanup. (Closed)
Patch Set: Cleanup Created 3 years, 10 months 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/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 19 matching lines...) Expand all
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, shelf_controller_.associated_group());
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(const std::string& app_id, 39 void ChromeLauncherController::LaunchApp(const std::string& app_id,
40 const std::string& launch_id,
40 ash::LaunchSource source, 41 ash::LaunchSource source,
41 int event_flags) { 42 int event_flags) {
42 launcher_controller_helper_->LaunchApp(app_id, source, event_flags); 43 launcher_controller_helper_->LaunchApp(app_id, launch_id, source,
43 } 44 event_flags);
44
45 void ChromeLauncherController::LaunchAppWithLaunchId(
46 const std::string& app_id,
47 const std::string& launch_id,
48 ash::LaunchSource source,
49 int event_flags) {
50 launcher_controller_helper_->LaunchAppWithLaunchId(app_id, launch_id, source,
51 event_flags);
52 } 45 }
53 46
54 ChromeLauncherController::ChromeLauncherController() : observer_binding_(this) { 47 ChromeLauncherController::ChromeLauncherController() : observer_binding_(this) {
55 DCHECK(!instance_); 48 DCHECK(!instance_);
56 instance_ = this; 49 instance_ = this;
57 } 50 }
58 51
59 bool ChromeLauncherController::ConnectToShelfController() { 52 bool ChromeLauncherController::ConnectToShelfController() {
60 if (shelf_controller_.is_bound()) 53 if (shelf_controller_.is_bound())
61 return true; 54 return true;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // This will uselessly store a preference value for invalid display ids. 184 // This will uselessly store a preference value for invalid display ids.
192 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id, 185 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id,
193 auto_hide); 186 auto_hide);
194 } 187 }
195 188
196 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id, 189 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id,
197 const gfx::ImageSkia& image) { 190 const gfx::ImageSkia& image) {
198 // Implemented by subclasses; this should not be called. 191 // Implemented by subclasses; this should not be called.
199 NOTREACHED(); 192 NOTREACHED();
200 } 193 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698