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

Side by Side Diff: ash/wm/power_button_controller.cc

Issue 2642853006: Remove the ash-enable-touch-view-testing flag (Closed)
Patch Set: Removing unnecessary test Created 3 years, 10 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
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/power_button_controller.h" 5 #include "ash/wm/power_button_controller.h"
6 6
7 #include "ash/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/system/chromeos/audio/tray_audio.h" 10 #include "ash/common/system/chromeos/audio/tray_audio.h"
(...skipping 21 matching lines...) Expand all
32 volume_percent_before_screenshot_(0), 32 volume_percent_before_screenshot_(0),
33 brightness_is_zero_(false), 33 brightness_is_zero_(false),
34 internal_display_off_and_external_display_on_(false), 34 internal_display_off_and_external_display_on_(false),
35 has_legacy_power_button_( 35 has_legacy_power_button_(
36 base::CommandLine::ForCurrentProcess()->HasSwitch( 36 base::CommandLine::ForCurrentProcess()->HasSwitch(
37 switches::kAuraLegacyPowerButton)), 37 switches::kAuraLegacyPowerButton)),
38 lock_state_controller_(controller) { 38 lock_state_controller_(controller) {
39 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( 39 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(
40 this); 40 this);
41 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 41 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
42 switches::kAshEnableTouchView) || 42 switches::kAshEnableTouchView)) {
43 base::CommandLine::ForCurrentProcess()->HasSwitch(
44 switches::kAshEnableTouchViewTesting)) {
45 tablet_controller_.reset( 43 tablet_controller_.reset(
46 new TabletPowerButtonController(lock_state_controller_)); 44 new TabletPowerButtonController(lock_state_controller_));
47 } 45 }
48 Shell::GetInstance()->display_configurator()->AddObserver(this); 46 Shell::GetInstance()->display_configurator()->AddObserver(this);
49 Shell::GetInstance()->PrependPreTargetHandler(this); 47 Shell::GetInstance()->PrependPreTargetHandler(this);
50 } 48 }
51 49
52 PowerButtonController::~PowerButtonController() { 50 PowerButtonController::~PowerButtonController() {
53 Shell::GetInstance()->RemovePreTargetHandler(this); 51 Shell::GetInstance()->RemovePreTargetHandler(this);
54 Shell::GetInstance()->display_configurator()->RemoveObserver(this); 52 Shell::GetInstance()->display_configurator()->RemoveObserver(this);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 internal_display_off && external_display_on; 191 internal_display_off && external_display_on;
194 } 192 }
195 193
196 void PowerButtonController::PowerButtonEventReceived( 194 void PowerButtonController::PowerButtonEventReceived(
197 bool down, 195 bool down,
198 const base::TimeTicks& timestamp) { 196 const base::TimeTicks& timestamp) {
199 OnPowerButtonEvent(down, timestamp); 197 OnPowerButtonEvent(down, timestamp);
200 } 198 }
201 199
202 } // namespace ash 200 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698