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

Side by Side Diff: ash/accelerators/accelerator_controller_delegate_aura.cc

Issue 2271373002: mash: Port mojo:ash_sysui's ContextMenuMus to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 3 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
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/accelerators/accelerator_controller_delegate_aura.h" 5 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 11
12 #include "ash/accelerators/accelerator_commands_aura.h" 12 #include "ash/accelerators/accelerator_commands_aura.h"
13 #include "ash/common/accelerators/debug_commands.h" 13 #include "ash/common/accelerators/debug_commands.h"
14 #include "ash/common/accessibility_types.h" 14 #include "ash/common/accessibility_types.h"
15 #include "ash/common/ash_switches.h" 15 #include "ash/common/ash_switches.h"
16 #include "ash/common/focus_cycler.h" 16 #include "ash/common/focus_cycler.h"
17 #include "ash/common/gpu_support.h" 17 #include "ash/common/gpu_support.h"
18 #include "ash/common/session/session_state_delegate.h" 18 #include "ash/common/session/session_state_delegate.h"
19 #include "ash/common/shelf/shelf.h" 19 #include "ash/common/shelf/shelf.h"
20 #include "ash/common/shelf/shelf_widget.h" 20 #include "ash/common/shelf/shelf_widget.h"
21 #include "ash/common/shelf/wm_shelf.h" 21 #include "ash/common/shelf/wm_shelf.h"
22 #include "ash/common/shell_delegate.h" 22 #include "ash/common/shell_delegate.h"
23 #include "ash/common/shell_window_ids.h" 23 #include "ash/common/shell_window_ids.h"
24 #include "ash/common/system/status_area_widget.h" 24 #include "ash/common/system/status_area_widget.h"
25 #include "ash/common/system/system_notifier.h" 25 #include "ash/common/system/system_notifier.h"
26 #include "ash/common/system/tray/system_tray.h" 26 #include "ash/common/system/tray/system_tray.h"
27 #include "ash/common/system/web_notification/web_notification_tray.h" 27 #include "ash/common/system/web_notification/web_notification_tray.h"
28 #include "ash/common/wallpaper/wallpaper_delegate.h"
28 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 29 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
29 #include "ash/common/wm/window_state.h" 30 #include "ash/common/wm/window_state.h"
30 #include "ash/common/wm/wm_event.h" 31 #include "ash/common/wm/wm_event.h"
31 #include "ash/common/wm_shell.h" 32 #include "ash/common/wm_shell.h"
32 #include "ash/debug.h" 33 #include "ash/debug.h"
33 #include "ash/desktop_background/desktop_background_controller.h" 34 #include "ash/desktop_background/desktop_background_controller.h"
34 #include "ash/desktop_background/user_wallpaper_delegate.h"
35 #include "ash/display/display_manager.h" 35 #include "ash/display/display_manager.h"
36 #include "ash/display/window_tree_host_manager.h" 36 #include "ash/display/window_tree_host_manager.h"
37 #include "ash/host/ash_window_tree_host.h" 37 #include "ash/host/ash_window_tree_host.h"
38 #include "ash/magnifier/magnification_controller.h" 38 #include "ash/magnifier/magnification_controller.h"
39 #include "ash/root_window_controller.h" 39 #include "ash/root_window_controller.h"
40 #include "ash/rotator/screen_rotation_animator.h" 40 #include "ash/rotator/screen_rotation_animator.h"
41 #include "ash/rotator/window_rotation.h" 41 #include "ash/rotator/window_rotation.h"
42 #include "ash/screen_util.h" 42 #include "ash/screen_util.h"
43 #include "ash/screenshot_delegate.h" 43 #include "ash/screenshot_delegate.h"
44 #include "ash/shell.h" 44 #include "ash/shell.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 canvas.DrawRoundRect(gfx::Rect(image_size), 100, paint); 286 canvas.DrawRoundRect(gfx::Rect(image_size), 100, paint);
287 return gfx::ImageSkia(canvas.ExtractImageRep()); 287 return gfx::ImageSkia(canvas.ExtractImageRep());
288 } 288 }
289 289
290 void HandleToggleDesktopBackgroundMode() { 290 void HandleToggleDesktopBackgroundMode() {
291 static int index = 0; 291 static int index = 0;
292 DesktopBackgroundController* desktop_background_controller = 292 DesktopBackgroundController* desktop_background_controller =
293 Shell::GetInstance()->desktop_background_controller(); 293 Shell::GetInstance()->desktop_background_controller();
294 switch (++index % 4) { 294 switch (++index % 4) {
295 case 0: 295 case 0:
296 ash::Shell::GetInstance() 296 ash::WmShell::Get()->wallpaper_delegate()->InitializeWallpaper();
297 ->user_wallpaper_delegate()
298 ->InitializeWallpaper();
299 break; 297 break;
300 case 1: 298 case 1:
301 desktop_background_controller->SetWallpaperImage( 299 desktop_background_controller->SetWallpaperImage(
302 CreateWallpaperImage(SK_ColorRED, SK_ColorBLUE), 300 CreateWallpaperImage(SK_ColorRED, SK_ColorBLUE),
303 wallpaper::WALLPAPER_LAYOUT_STRETCH); 301 wallpaper::WALLPAPER_LAYOUT_STRETCH);
304 break; 302 break;
305 case 2: 303 case 2:
306 desktop_background_controller->SetWallpaperImage( 304 desktop_background_controller->SetWallpaperImage(
307 CreateWallpaperImage(SK_ColorBLUE, SK_ColorGREEN), 305 CreateWallpaperImage(SK_ColorBLUE, SK_ColorGREEN),
308 wallpaper::WALLPAPER_LAYOUT_CENTER); 306 wallpaper::WALLPAPER_LAYOUT_CENTER);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 message_center::NotifierId( 644 message_center::NotifierId(
647 message_center::NotifierId::SYSTEM_COMPONENT, 645 message_center::NotifierId::SYSTEM_COMPONENT,
648 system_notifier::kNotifierDeprecatedAccelerator), 646 system_notifier::kNotifierDeprecatedAccelerator),
649 message_center::RichNotificationData(), 647 message_center::RichNotificationData(),
650 new DeprecatedAcceleratorNotificationDelegate)); 648 new DeprecatedAcceleratorNotificationDelegate));
651 message_center::MessageCenter::Get()->AddNotification( 649 message_center::MessageCenter::Get()->AddNotification(
652 std::move(notification)); 650 std::move(notification));
653 } 651 }
654 652
655 } // namespace ash 653 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698