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

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

Issue 684783004: Prefix CommandLine usage with base namespace (Part 4: ash/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month 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/debug_commands.cc ('k') | ash/ash_touch_exploration_manager_chromeos.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/magnifier_key_scroller.h" 5 #include "ash/accelerators/magnifier_key_scroller.h"
6 6
7 #include "ash/accelerators/key_hold_detector.h" 7 #include "ash/accelerators/key_hold_detector.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/magnifier/magnification_controller.h" 9 #include "ash/magnifier/magnification_controller.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace { 14 namespace {
15 bool magnifier_key_scroller_enabled = false; 15 bool magnifier_key_scroller_enabled = false;
16 } 16 }
17 17
18 // static 18 // static
19 bool MagnifierKeyScroller::IsEnabled() { 19 bool MagnifierKeyScroller::IsEnabled() {
20 bool has_switch = false; 20 bool has_switch = false;
21 #if defined(OS_CHROMEOS) 21 #if defined(OS_CHROMEOS)
22 has_switch = CommandLine::ForCurrentProcess()->HasSwitch( 22 has_switch = base::CommandLine::ForCurrentProcess()->HasSwitch(
23 switches::kAshEnableMagnifierKeyScroller); 23 switches::kAshEnableMagnifierKeyScroller);
24 #endif 24 #endif
25 25
26 return (magnifier_key_scroller_enabled || has_switch) && 26 return (magnifier_key_scroller_enabled || has_switch) &&
27 ash::Shell::GetInstance()->magnification_controller()->IsEnabled(); 27 ash::Shell::GetInstance()->magnification_controller()->IsEnabled();
28 } 28 }
29 29
30 // static 30 // static
31 void MagnifierKeyScroller::SetEnabled(bool enabled) { 31 void MagnifierKeyScroller::SetEnabled(bool enabled) {
32 magnifier_key_scroller_enabled = enabled; 32 magnifier_key_scroller_enabled = enabled;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 MagnificationController* controller = 76 MagnificationController* controller =
77 Shell::GetInstance()->magnification_controller(); 77 Shell::GetInstance()->magnification_controller();
78 controller->SetScrollDirection(MagnificationController::SCROLL_NONE); 78 controller->SetScrollDirection(MagnificationController::SCROLL_NONE);
79 } 79 }
80 80
81 MagnifierKeyScroller::MagnifierKeyScroller() {} 81 MagnifierKeyScroller::MagnifierKeyScroller() {}
82 82
83 MagnifierKeyScroller::~MagnifierKeyScroller() {} 83 MagnifierKeyScroller::~MagnifierKeyScroller() {}
84 84
85 } // namespace ash 85 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/debug_commands.cc ('k') | ash/ash_touch_exploration_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698