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_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 TabStripModel* tab_strip = browser_to_close.back()->tab_strip_model(); | 1379 TabStripModel* tab_strip = browser_to_close.back()->tab_strip_model(); |
1380 if (!tab_strip->empty()) | 1380 if (!tab_strip->empty()) |
1381 tab_strip->CloseWebContentsAt(0, TabStripModel::CLOSE_NONE); | 1381 tab_strip->CloseWebContentsAt(0, TabStripModel::CLOSE_NONE); |
1382 browser_to_close.pop_back(); | 1382 browser_to_close.pop_back(); |
1383 } | 1383 } |
1384 } | 1384 } |
1385 | 1385 |
1386 void ChromeLauncherControllerImpl::SetShelfItemDelegate( | 1386 void ChromeLauncherControllerImpl::SetShelfItemDelegate( |
1387 ash::ShelfID id, | 1387 ash::ShelfID id, |
1388 ash::mojom::ShelfItemDelegate* item_delegate) { | 1388 ash::mojom::ShelfItemDelegate* item_delegate) { |
1389 DCHECK_GT(id, 0); | 1389 DCHECK_NE(id, ash::kInvalidShelfID); |
1390 DCHECK(item_delegate); | 1390 DCHECK(item_delegate); |
1391 model_->SetShelfItemDelegate( | 1391 model_->SetShelfItemDelegate( |
1392 id, base::WrapUnique<ash::mojom::ShelfItemDelegate>(item_delegate)); | 1392 id, base::WrapUnique<ash::mojom::ShelfItemDelegate>(item_delegate)); |
1393 } | 1393 } |
1394 | 1394 |
1395 void ChromeLauncherControllerImpl::ReleaseProfile() { | 1395 void ChromeLauncherControllerImpl::ReleaseProfile() { |
1396 if (app_sync_ui_state_) | 1396 if (app_sync_ui_state_) |
1397 app_sync_ui_state_->RemoveObserver(this); | 1397 app_sync_ui_state_->RemoveObserver(this); |
1398 | 1398 |
1399 app_updaters_.clear(); | 1399 app_updaters_.clear(); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 LauncherItemController* controller = GetLauncherItemController(item.id); | 1499 LauncherItemController* controller = GetLauncherItemController(item.id); |
1500 if (!controller || controller->image_set_by_controller()) | 1500 if (!controller || controller->image_set_by_controller()) |
1501 continue; | 1501 continue; |
1502 item.image = image; | 1502 item.image = image; |
1503 if (arc_deferred_launcher_) | 1503 if (arc_deferred_launcher_) |
1504 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); | 1504 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); |
1505 model_->Set(index, item); | 1505 model_->Set(index, item); |
1506 // It's possible we're waiting on more than one item, so don't break. | 1506 // It's possible we're waiting on more than one item, so don't break. |
1507 } | 1507 } |
1508 } | 1508 } |
OLD | NEW |