| 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 |
| 11 #include "ash/multi_profile_uma.h" | 11 #include "ash/multi_profile_uma.h" |
| 12 #include "ash/public/cpp/app_launch_id.h" | 12 #include "ash/public/cpp/app_launch_id.h" |
| 13 #include "ash/public/cpp/shelf_item_delegate.h" | 13 #include "ash/public/cpp/shelf_item_delegate.h" |
| 14 #include "ash/resources/grit/ash_resources.h" | 14 #include "ash/resources/grit/ash_resources.h" |
| 15 #include "ash/root_window_controller.h" | 15 #include "ash/root_window_controller.h" |
| 16 #include "ash/shelf/shelf_model.h" | 16 #include "ash/shelf/shelf_model.h" |
| 17 #include "ash/shelf/wm_shelf.h" | 17 #include "ash/shelf/wm_shelf.h" |
| 18 #include "ash/shell.h" | 18 #include "ash/shell.h" |
| 19 #include "ash/shell_port.h" |
| 19 #include "ash/strings/grit/ash_strings.h" | 20 #include "ash/strings/grit/ash_strings.h" |
| 20 #include "ash/system/tray/system_tray_delegate.h" | 21 #include "ash/system/tray/system_tray_delegate.h" |
| 21 #include "ash/wm/window_util.h" | 22 #include "ash/wm/window_util.h" |
| 22 #include "ash/wm_shell.h" | |
| 23 #include "ash/wm_window.h" | 23 #include "ash/wm_window.h" |
| 24 #include "base/command_line.h" | 24 #include "base/command_line.h" |
| 25 #include "base/macros.h" | 25 #include "base/macros.h" |
| 26 #include "base/strings/pattern.h" | 26 #include "base/strings/pattern.h" |
| 27 #include "base/strings/string_util.h" | 27 #include "base/strings/string_util.h" |
| 28 #include "base/strings/utf_string_conversions.h" | 28 #include "base/strings/utf_string_conversions.h" |
| 29 #include "base/threading/thread_task_runner_handle.h" | 29 #include "base/threading/thread_task_runner_handle.h" |
| 30 #include "base/values.h" | 30 #include "base/values.h" |
| 31 #include "build/build_config.h" | 31 #include "build/build_config.h" |
| 32 #include "chrome/browser/browser_process.h" | 32 #include "chrome/browser/browser_process.h" |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 } | 1395 } |
| 1396 | 1396 |
| 1397 /////////////////////////////////////////////////////////////////////////////// | 1397 /////////////////////////////////////////////////////////////////////////////// |
| 1398 // ash::WindowTreeHostManager::Observer: | 1398 // ash::WindowTreeHostManager::Observer: |
| 1399 | 1399 |
| 1400 void ChromeLauncherControllerImpl::OnDisplayConfigurationChanged() { | 1400 void ChromeLauncherControllerImpl::OnDisplayConfigurationChanged() { |
| 1401 // In BOTTOM_LOCKED state, ignore the call of SetShelfBehaviorsFromPrefs. | 1401 // In BOTTOM_LOCKED state, ignore the call of SetShelfBehaviorsFromPrefs. |
| 1402 // Because it might be called by some operations, like crbug.com/627040 | 1402 // Because it might be called by some operations, like crbug.com/627040 |
| 1403 // rotating screen. | 1403 // rotating screen. |
| 1404 ash::WmShelf* shelf = | 1404 ash::WmShelf* shelf = |
| 1405 ash::WmShelf::ForWindow(ash::WmShell::Get()->GetPrimaryRootWindow()); | 1405 ash::WmShelf::ForWindow(ash::ShellPort::Get()->GetPrimaryRootWindow()); |
| 1406 if (shelf->alignment() != ash::SHELF_ALIGNMENT_BOTTOM_LOCKED) | 1406 if (shelf->alignment() != ash::SHELF_ALIGNMENT_BOTTOM_LOCKED) |
| 1407 SetShelfBehaviorsFromPrefs(); | 1407 SetShelfBehaviorsFromPrefs(); |
| 1408 } | 1408 } |
| 1409 | 1409 |
| 1410 /////////////////////////////////////////////////////////////////////////////// | 1410 /////////////////////////////////////////////////////////////////////////////// |
| 1411 // AppSyncUIStateObserver: | 1411 // AppSyncUIStateObserver: |
| 1412 | 1412 |
| 1413 void ChromeLauncherControllerImpl::OnAppSyncUIStatusChanged() { | 1413 void ChromeLauncherControllerImpl::OnAppSyncUIStatusChanged() { |
| 1414 // Update the app list button title to reflect the syncing status. | 1414 // Update the app list button title to reflect the syncing status. |
| 1415 base::string16 title = l10n_util::GetStringUTF16( | 1415 base::string16 title = l10n_util::GetStringUTF16( |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1440 ash::ShelfItemDelegate* delegate = GetShelfItemDelegate(item.id); | 1440 ash::ShelfItemDelegate* delegate = GetShelfItemDelegate(item.id); |
| 1441 if (!delegate || delegate->image_set_by_controller()) | 1441 if (!delegate || delegate->image_set_by_controller()) |
| 1442 continue; | 1442 continue; |
| 1443 item.image = image; | 1443 item.image = image; |
| 1444 if (arc_deferred_launcher_) | 1444 if (arc_deferred_launcher_) |
| 1445 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); | 1445 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); |
| 1446 model_->Set(index, item); | 1446 model_->Set(index, item); |
| 1447 // It's possible we're waiting on more than one item, so don't break. | 1447 // It's possible we're waiting on more than one item, so don't break. |
| 1448 } | 1448 } |
| 1449 } | 1449 } |
| OLD | NEW |