OLD | NEW |
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/wm/maximize_mode/maximize_mode_controller.h" | 5 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/accelerators/accelerator_table.h" | 10 #include "ash/accelerators/accelerator_table.h" |
9 #include "ash/ash_switches.h" | 11 #include "ash/ash_switches.h" |
10 #include "ash/display/display_manager.h" | 12 #include "ash/display/display_manager.h" |
11 #include "ash/shell.h" | 13 #include "ash/shell.h" |
12 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 14 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
13 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" | 15 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" |
14 #include "base/command_line.h" | 16 #include "base/command_line.h" |
15 #include "base/metrics/histogram.h" | 17 #include "base/metrics/histogram.h" |
16 #include "base/time/default_tick_clock.h" | 18 #include "base/time/default_tick_clock.h" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 | 401 |
400 base::TimeTicks now = tick_clock_->NowTicks(); | 402 base::TimeTicks now = tick_clock_->NowTicks(); |
401 DCHECK(now >= last_lid_open_time_); | 403 DCHECK(now >= last_lid_open_time_); |
402 base::TimeDelta elapsed_time = now - last_lid_open_time_; | 404 base::TimeDelta elapsed_time = now - last_lid_open_time_; |
403 return elapsed_time.InSeconds() <= kLidRecentlyOpenedDurationSeconds; | 405 return elapsed_time.InSeconds() <= kLidRecentlyOpenedDurationSeconds; |
404 } | 406 } |
405 | 407 |
406 void MaximizeModeController::SetTickClockForTest( | 408 void MaximizeModeController::SetTickClockForTest( |
407 scoped_ptr<base::TickClock> tick_clock) { | 409 scoped_ptr<base::TickClock> tick_clock) { |
408 DCHECK(tick_clock_); | 410 DCHECK(tick_clock_); |
409 tick_clock_ = tick_clock.Pass(); | 411 tick_clock_ = std::move(tick_clock); |
410 } | 412 } |
411 | 413 |
412 } // namespace ash | 414 } // namespace ash |
OLD | NEW |