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

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

Issue 2254733003: Add ui::LayerObserver and use it to update Alt+Tab previews as needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for other test Created 4 years, 3 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
« no previous file with comments | « ash/common/wm/forwarding_layer_delegate.cc ('k') | ash/wm/window_mirror_view.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/wm/drag_window_controller.h" 5 #include "ash/wm/drag_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 127
128 void SetOpacity(const aura::Window* original_window, float opacity) { 128 void SetOpacity(const aura::Window* original_window, float opacity) {
129 ui::Layer* layer = drag_window_->layer(); 129 ui::Layer* layer = drag_window_->layer();
130 ui::ScopedLayerAnimationSettings scoped_setter(layer->GetAnimator()); 130 ui::ScopedLayerAnimationSettings scoped_setter(layer->GetAnimator());
131 layer->SetOpacity(opacity); 131 layer->SetOpacity(opacity);
132 layer_owner_->root()->SetOpacity(1.0f); 132 layer_owner_->root()->SetOpacity(1.0f);
133 } 133 }
134 134
135 // aura::WindowDelegate: 135 // aura::WindowDelegate:
136 ui::LayerDelegate* CreateDelegate(ui::LayerDelegate* delegate) override { 136 ui::LayerDelegate* CreateDelegate(ui::Layer* foo, ui::Layer* layer) override {
137 if (!delegate) 137 if (!layer || !layer->delegate())
138 return nullptr; 138 return nullptr;
139 wm::ForwardingLayerDelegate* new_delegate = new wm::ForwardingLayerDelegate( 139 wm::ForwardingLayerDelegate* new_delegate =
140 WmWindowAura::Get(original_window_), delegate); 140 new wm::ForwardingLayerDelegate(foo, layer);
141 delegates_.push_back(base::WrapUnique(new_delegate)); 141 delegates_.push_back(base::WrapUnique(new_delegate));
142 return new_delegate; 142 return new_delegate;
143 } 143 }
144 144
145 // aura::WindowDelegate: 145 // aura::WindowDelegate:
146 gfx::Size GetMinimumSize() const override { return gfx::Size(); } 146 gfx::Size GetMinimumSize() const override { return gfx::Size(); }
147 gfx::Size GetMaximumSize() const override { return gfx::Size(); } 147 gfx::Size GetMaximumSize() const override { return gfx::Size(); }
148 void OnBoundsChanged(const gfx::Rect& old_bounds, 148 void OnBoundsChanged(const gfx::Rect& old_bounds,
149 const gfx::Rect& new_bounds) override {} 149 const gfx::Rect& new_bounds) override {}
150 gfx::NativeCursor GetCursor(const gfx::Point& point) override { 150 gfx::NativeCursor GetCursor(const gfx::Point& point) override {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 layers.pop_back(); 261 layers.pop_back();
262 if (layer->delegate()) 262 if (layer->delegate())
263 layer->delegate()->OnPaintLayer(context); 263 layer->delegate()->OnPaintLayer(context);
264 for (auto* child : layer->children()) 264 for (auto* child : layer->children())
265 layers.push_back(child); 265 layers.push_back(child);
266 } 266 }
267 } 267 }
268 } 268 }
269 269
270 } // namespace ash 270 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/forwarding_layer_delegate.cc ('k') | ash/wm/window_mirror_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698