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 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 } | 1328 } |
1329 | 1329 |
1330 /////////////////////////////////////////////////////////////////////////////// | 1330 /////////////////////////////////////////////////////////////////////////////// |
1331 // ash::WindowTreeHostManager::Observer: | 1331 // ash::WindowTreeHostManager::Observer: |
1332 | 1332 |
1333 void ChromeLauncherControllerImpl::OnDisplayConfigurationChanged() { | 1333 void ChromeLauncherControllerImpl::OnDisplayConfigurationChanged() { |
1334 // In BOTTOM_LOCKED state, ignore the call of SetShelfBehaviorsFromPrefs. | 1334 // In BOTTOM_LOCKED state, ignore the call of SetShelfBehaviorsFromPrefs. |
1335 // Because it might be called by some operations, like crbug.com/627040 | 1335 // Because it might be called by some operations, like crbug.com/627040 |
1336 // rotating screen. | 1336 // rotating screen. |
1337 ash::WmShelf* shelf = | 1337 ash::WmShelf* shelf = |
1338 ash::WmShelf::ForWindow(ash::WmShell::Get()->GetPrimaryRootWindow()); | 1338 ash::WmShelf::ForWindow(ash::ShellPort::Get()->GetPrimaryRootWindow()); |
1339 if (shelf->alignment() != ash::SHELF_ALIGNMENT_BOTTOM_LOCKED) | 1339 if (shelf->alignment() != ash::SHELF_ALIGNMENT_BOTTOM_LOCKED) |
1340 SetShelfBehaviorsFromPrefs(); | 1340 SetShelfBehaviorsFromPrefs(); |
1341 } | 1341 } |
1342 | 1342 |
1343 /////////////////////////////////////////////////////////////////////////////// | 1343 /////////////////////////////////////////////////////////////////////////////// |
1344 // AppSyncUIStateObserver: | 1344 // AppSyncUIStateObserver: |
1345 | 1345 |
1346 void ChromeLauncherControllerImpl::OnAppSyncUIStatusChanged() { | 1346 void ChromeLauncherControllerImpl::OnAppSyncUIStatusChanged() { |
1347 // Update the app list button title to reflect the syncing status. | 1347 // Update the app list button title to reflect the syncing status. |
1348 base::string16 title = l10n_util::GetStringUTF16( | 1348 base::string16 title = l10n_util::GetStringUTF16( |
(...skipping 25 matching lines...) Expand all Loading... |
1374 item.app_launch_id.app_id() != app_id) { | 1374 item.app_launch_id.app_id() != app_id) { |
1375 continue; | 1375 continue; |
1376 } | 1376 } |
1377 item.image = image; | 1377 item.image = image; |
1378 if (arc_deferred_launcher_) | 1378 if (arc_deferred_launcher_) |
1379 arc_deferred_launcher_->MaybeApplySpinningEffect(app_id, &item.image); | 1379 arc_deferred_launcher_->MaybeApplySpinningEffect(app_id, &item.image); |
1380 model_->Set(index, item); | 1380 model_->Set(index, item); |
1381 // It's possible we're waiting on more than one item, so don't break. | 1381 // It's possible we're waiting on more than one item, so don't break. |
1382 } | 1382 } |
1383 } | 1383 } |
OLD | NEW |