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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_controller.cc

Issue 2811153002: Restore bounds after the screen is restored in clamshell (Closed)
Patch Set: Restore bounds after completely transitioned to clamshell. Created 3 years, 8 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 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> 7 #include <utility>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // TODO(jonross): Move the maximize mode notifications from ShellObserver 161 // TODO(jonross): Move the maximize mode notifications from ShellObserver
162 // to MaximizeModeController::Observer 162 // to MaximizeModeController::Observer
163 ShellPort::Get()->RecordUserMetricsAction(UMA_MAXIMIZE_MODE_ENABLED); 163 ShellPort::Get()->RecordUserMetricsAction(UMA_MAXIMIZE_MODE_ENABLED);
164 Shell::Get()->NotifyMaximizeModeStarted(); 164 Shell::Get()->NotifyMaximizeModeStarted();
165 165
166 observers_.ForAllPtrs([](mojom::TouchViewObserver* observer) { 166 observers_.ForAllPtrs([](mojom::TouchViewObserver* observer) {
167 observer->OnTouchViewToggled(true); 167 observer->OnTouchViewToggled(true);
168 }); 168 });
169 169
170 } else { 170 } else {
171 maximize_mode_window_manager_->SetIgnoreWmEventsForExit();
171 Shell::Get()->NotifyMaximizeModeEnding(); 172 Shell::Get()->NotifyMaximizeModeEnding();
172 maximize_mode_window_manager_.reset(); 173 maximize_mode_window_manager_.reset();
173 ShellPort::Get()->RecordUserMetricsAction(UMA_MAXIMIZE_MODE_DISABLED); 174 ShellPort::Get()->RecordUserMetricsAction(UMA_MAXIMIZE_MODE_DISABLED);
174 Shell::Get()->NotifyMaximizeModeEnded(); 175 Shell::Get()->NotifyMaximizeModeEnded();
175 176
176 observers_.ForAllPtrs([](mojom::TouchViewObserver* observer) { 177 observers_.ForAllPtrs([](mojom::TouchViewObserver* observer) {
177 observer->OnTouchViewToggled(false); 178 observer->OnTouchViewToggled(false);
178 }); 179 });
179 } 180 }
180 } 181 }
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 return elapsed_time.InSeconds() <= kLidRecentlyOpenedDurationSeconds; 476 return elapsed_time.InSeconds() <= kLidRecentlyOpenedDurationSeconds;
476 } 477 }
477 478
478 void MaximizeModeController::SetTickClockForTest( 479 void MaximizeModeController::SetTickClockForTest(
479 std::unique_ptr<base::TickClock> tick_clock) { 480 std::unique_ptr<base::TickClock> tick_clock) {
480 DCHECK(tick_clock_); 481 DCHECK(tick_clock_);
481 tick_clock_ = std::move(tick_clock); 482 tick_clock_ = std::move(tick_clock);
482 } 483 }
483 484
484 } // namespace ash 485 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/screen_orientation_controller_chromeos.cc ('k') | ash/wm/maximize_mode/maximize_mode_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698