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

Side by Side Diff: ash/display/output_configurator_animation.cc

Issue 192483007: Move chromeos/display/* to ui/display/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include display.gyp into ChromeOS builds only Created 6 years, 9 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/display/output_configurator_animation.h ('k') | ash/display/projecting_observer_chromeos.h » ('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/display/output_configurator_animation.h" 5 #include "ash/display/output_configurator_animation.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ui::ScopedLayerAnimationSettings settings(hiding_layer->GetAnimator()); 197 ui::ScopedLayerAnimationSettings settings(hiding_layer->GetAnimator());
198 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( 198 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
199 kFadingAnimationDurationInMS)); 199 kFadingAnimationDurationInMS));
200 observer->AddNewAnimator(hiding_layer->GetAnimator()); 200 observer->AddNewAnimator(hiding_layer->GetAnimator());
201 hiding_layer->SetOpacity(0.0f); 201 hiding_layer->SetOpacity(0.0f);
202 hiding_layer->SetVisible(false); 202 hiding_layer->SetVisible(false);
203 } 203 }
204 } 204 }
205 205
206 void OutputConfiguratorAnimation::OnDisplayModeChanged( 206 void OutputConfiguratorAnimation::OnDisplayModeChanged(
207 const std::vector<chromeos::OutputConfigurator::OutputSnapshot>& outputs) { 207 const std::vector<ui::OutputConfigurator::OutputSnapshot>& outputs) {
208 if (!hiding_layers_.empty()) 208 if (!hiding_layers_.empty())
209 StartFadeInAnimation(); 209 StartFadeInAnimation();
210 } 210 }
211 211
212 void OutputConfiguratorAnimation::OnDisplayModeChangeFailed( 212 void OutputConfiguratorAnimation::OnDisplayModeChangeFailed(
213 ui::OutputState failed_new_state) { 213 ui::OutputState failed_new_state) {
214 if (!hiding_layers_.empty()) 214 if (!hiding_layers_.empty())
215 StartFadeInAnimation(); 215 StartFadeInAnimation();
216 } 216 }
217 217
218 void OutputConfiguratorAnimation::ClearHidingLayers() { 218 void OutputConfiguratorAnimation::ClearHidingLayers() {
219 if (timer_) { 219 if (timer_) {
220 timer_->Stop(); 220 timer_->Stop();
221 timer_.reset(); 221 timer_.reset();
222 } 222 }
223 STLDeleteContainerPairSecondPointers( 223 STLDeleteContainerPairSecondPointers(
224 hiding_layers_.begin(), hiding_layers_.end()); 224 hiding_layers_.begin(), hiding_layers_.end());
225 hiding_layers_.clear(); 225 hiding_layers_.clear();
226 } 226 }
227 227
228 } // namespace internal 228 } // namespace internal
229 } // namespace ash 229 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/output_configurator_animation.h ('k') | ash/display/projecting_observer_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698