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

Side by Side Diff: ash/wm/gestures/bezel_gesture_handler.cc

Issue 10917075: events: Move some files into ui/base/events/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/event_rewriter_event_filter.cc ('k') | ash/wm/gestures/system_pinch_handler.cc » ('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 (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/wm/gestures/bezel_gesture_handler.h" 5 #include "ash/wm/gestures/bezel_gesture_handler.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/launcher/launcher.h" 10 #include "ash/launcher/launcher.h"
11 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/shell_delegate.h" 13 #include "ash/shell_delegate.h"
14 #include "ash/system/brightness/brightness_control_delegate.h" 14 #include "ash/system/brightness/brightness_control_delegate.h"
15 #include "ash/system/tray/system_tray_delegate.h" 15 #include "ash/system/tray/system_tray_delegate.h"
16 #include "ash/volume_control_delegate.h" 16 #include "ash/volume_control_delegate.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "ui/aura/root_window.h" 18 #include "ui/aura/root_window.h"
19 #include "ui/base/event.h" 19 #include "ui/base/events/event.h"
20 #include "ui/base/ui_base_switches.h" 20 #include "ui/base/ui_base_switches.h"
21 #include "ui/gfx/screen.h" 21 #include "ui/gfx/screen.h"
22 22
23 namespace { 23 namespace {
24 24
25 // Device bezel operation constants (volume/brightness slider). 25 // Device bezel operation constants (volume/brightness slider).
26 26
27 // This is the minimal brightness value allowed for the display. 27 // This is the minimal brightness value allowed for the display.
28 const double kMinBrightnessPercent = 5.0; 28 const double kMinBrightnessPercent = 5.0;
29 // For device operation, the finger is not allowed to enter the screen more 29 // For device operation, the finger is not allowed to enter the screen more
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // Turning off the display makes no sense, so we map the accessible range to 277 // Turning off the display makes no sense, so we map the accessible range to
278 // kMinimumBrightness .. 100%. 278 // kMinimumBrightness .. 100%.
279 percent = (percent + kMinBrightnessPercent) * 100.0 / 279 percent = (percent + kMinBrightnessPercent) * 100.0 /
280 (100.0 + kMinBrightnessPercent); 280 (100.0 + kMinBrightnessPercent);
281 // Clamp to avoid rounding issues. 281 // Clamp to avoid rounding issues.
282 return std::min(percent, 100.0); 282 return std::min(percent, 100.0);
283 } 283 }
284 284
285 } // namespace internal 285 } // namespace internal
286 } // namespace ash 286 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/event_rewriter_event_filter.cc ('k') | ash/wm/gestures/system_pinch_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698