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

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

Issue 22324002: Allows invoking debugging print commands for any builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <iostream> 9 #include <iostream>
10 #include <string> 10 #include <string>
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 // We don't do anything with these at present on the device, 913 // We don't do anything with these at present on the device,
914 // (power button events are reported to us from powerm via 914 // (power button events are reported to us from powerm via
915 // D-BUS), but we consume them to prevent them from getting 915 // D-BUS), but we consume them to prevent them from getting
916 // passed to apps -- see http://crbug.com/146609. 916 // passed to apps -- see http://crbug.com/146609.
917 return true; 917 return true;
918 case LOCK_PRESSED: 918 case LOCK_PRESSED:
919 case LOCK_RELEASED: 919 case LOCK_RELEASED:
920 Shell::GetInstance()->power_button_controller()-> 920 Shell::GetInstance()->power_button_controller()->
921 OnLockButtonEvent(action == LOCK_PRESSED, base::TimeTicks()); 921 OnLockButtonEvent(action == LOCK_PRESSED, base::TimeTicks());
922 return true; 922 return true;
923 #if !defined(NDEBUG)
924 case PRINT_LAYER_HIERARCHY: 923 case PRINT_LAYER_HIERARCHY:
925 return HandlePrintLayerHierarchy(); 924 return HandlePrintLayerHierarchy();
926 case PRINT_VIEW_HIERARCHY: 925 case PRINT_VIEW_HIERARCHY:
927 return HandlePrintViewHierarchy(); 926 return HandlePrintViewHierarchy();
928 case PRINT_WINDOW_HIERARCHY: 927 case PRINT_WINDOW_HIERARCHY:
929 return HandlePrintWindowHierarchy(); 928 return HandlePrintWindowHierarchy();
930 #endif
931 default: 929 default:
932 NOTREACHED() << "Unhandled action " << action; 930 NOTREACHED() << "Unhandled action " << action;
933 } 931 }
934 return false; 932 return false;
935 } 933 }
936 934
937 void AcceleratorController::SetBrightnessControlDelegate( 935 void AcceleratorController::SetBrightnessControlDelegate(
938 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) { 936 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) {
939 // Install brightness control delegate only when internal 937 // Install brightness control delegate only when internal
940 // display exists. 938 // display exists.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 keyboard_brightness_control_delegate) { 983 keyboard_brightness_control_delegate) {
986 keyboard_brightness_control_delegate_ = 984 keyboard_brightness_control_delegate_ =
987 keyboard_brightness_control_delegate.Pass(); 985 keyboard_brightness_control_delegate.Pass();
988 } 986 }
989 987
990 bool AcceleratorController::CanHandleAccelerators() const { 988 bool AcceleratorController::CanHandleAccelerators() const {
991 return true; 989 return true;
992 } 990 }
993 991
994 } // namespace ash 992 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698