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

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

Issue 2696073002: Merge ShelfItemDelegate::ItemSelected & LauncherItemDelegate::Activate. (Closed)
Patch Set: nit 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(ash::AppLauncherId id, 39 void ChromeLauncherController::LaunchApp(ash::AppLauncherId id,
40 ash::LaunchSource 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
50 bool ChromeLauncherController::ConnectToShelfController() { 50 bool ChromeLauncherController::ConnectToShelfController() {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698