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

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

Issue 2282853002: ash: Add comment about where to add new accelerators (Closed)
Patch Set: 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 | « ash/accelerators/accelerator_controller_delegate_aura.h ('k') | no next file » | 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>
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 AcceleratorControllerDelegateAura::~AcceleratorControllerDelegateAura() {} 355 AcceleratorControllerDelegateAura::~AcceleratorControllerDelegateAura() {}
356 356
357 void AcceleratorControllerDelegateAura::SetScreenshotDelegate( 357 void AcceleratorControllerDelegateAura::SetScreenshotDelegate(
358 std::unique_ptr<ScreenshotDelegate> screenshot_delegate) { 358 std::unique_ptr<ScreenshotDelegate> screenshot_delegate) {
359 screenshot_delegate_ = std::move(screenshot_delegate); 359 screenshot_delegate_ = std::move(screenshot_delegate);
360 } 360 }
361 361
362 bool AcceleratorControllerDelegateAura::HandlesAction( 362 bool AcceleratorControllerDelegateAura::HandlesAction(
363 AcceleratorAction action) { 363 AcceleratorAction action) {
364 // NOTE: When adding a new accelerator that only depends on //ash/common code,
365 // add it to accelerator_controller.cc instead. See class comment.
364 switch (action) { 366 switch (action) {
365 case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE: 367 case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE:
366 case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR: 368 case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR:
367 case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN: 369 case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN:
368 case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS: 370 case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS:
369 case DEBUG_TOGGLE_SHOW_FPS_COUNTER: 371 case DEBUG_TOGGLE_SHOW_FPS_COUNTER:
370 case DEBUG_TOGGLE_SHOW_PAINT_RECTS: 372 case DEBUG_TOGGLE_SHOW_PAINT_RECTS:
371 case FOCUS_SHELF: 373 case FOCUS_SHELF:
372 case LAUNCH_APP_0: 374 case LAUNCH_APP_0:
373 case LAUNCH_APP_1: 375 case LAUNCH_APP_1:
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 message_center::NotifierId( 646 message_center::NotifierId(
645 message_center::NotifierId::SYSTEM_COMPONENT, 647 message_center::NotifierId::SYSTEM_COMPONENT,
646 system_notifier::kNotifierDeprecatedAccelerator), 648 system_notifier::kNotifierDeprecatedAccelerator),
647 message_center::RichNotificationData(), 649 message_center::RichNotificationData(),
648 new DeprecatedAcceleratorNotificationDelegate)); 650 new DeprecatedAcceleratorNotificationDelegate));
649 message_center::MessageCenter::Get()->AddNotification( 651 message_center::MessageCenter::Get()->AddNotification(
650 std::move(notification)); 652 std::move(notification));
651 } 653 }
652 654
653 } // namespace ash 655 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_controller_delegate_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698