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

Side by Side Diff: ash/wm/overview/scoped_transform_overview_window.cc

Issue 810033010: Remove TransparentActivateWindowButton from Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 5 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/overview/scoped_transform_overview_window.h" 5 #include "ash/wm/overview/scoped_transform_overview_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 aura::Window* window) { 159 aura::Window* window) {
160 return TransientDescendantIteratorRange( 160 return TransientDescendantIteratorRange(
161 TransientDescendantIterator(GetTransientRoot(window))); 161 TransientDescendantIterator(GetTransientRoot(window)));
162 } 162 }
163 163
164 } // namespace 164 } // namespace
165 165
166 ScopedTransformOverviewWindow::ScopedTransformOverviewWindow( 166 ScopedTransformOverviewWindow::ScopedTransformOverviewWindow(
167 aura::Window* window) 167 aura::Window* window)
168 : window_(window), 168 : window_(window),
169 activate_button_(new TransparentActivateWindowButton(
170 window_->GetRootWindow(), this)),
171 minimized_(window->GetProperty(aura::client::kShowStateKey) == 169 minimized_(window->GetProperty(aura::client::kShowStateKey) ==
172 ui::SHOW_STATE_MINIMIZED), 170 ui::SHOW_STATE_MINIMIZED),
173 ignored_by_shelf_(wm::GetWindowState(window)->ignored_by_shelf()), 171 ignored_by_shelf_(wm::GetWindowState(window)->ignored_by_shelf()),
174 overview_started_(false), 172 overview_started_(false),
175 original_transform_(window->layer()->GetTargetTransform()), 173 original_transform_(window->layer()->GetTargetTransform()),
176 original_opacity_(window->layer()->GetTargetOpacity()) { 174 original_opacity_(window->layer()->GetTargetOpacity()) {
177 DCHECK(window_); 175 DCHECK(window_);
178 } 176 }
179 177
180 ScopedTransformOverviewWindow::~ScopedTransformOverviewWindow() { 178 ScopedTransformOverviewWindow::~ScopedTransformOverviewWindow() {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 window->SetTransform(new_transform); 295 window->SetTransform(new_transform);
298 } 296 }
299 } 297 }
300 298
301 void ScopedTransformOverviewWindow::SetOpacity(float opacity) { 299 void ScopedTransformOverviewWindow::SetOpacity(float opacity) {
302 for (const auto& window : GetTransientTreeIterator(window_)) { 300 for (const auto& window : GetTransientTreeIterator(window_)) {
303 window->layer()->SetOpacity(opacity); 301 window->layer()->SetOpacity(opacity);
304 } 302 }
305 } 303 }
306 304
307 void ScopedTransformOverviewWindow::Select() {
308 wm::GetWindowState(window_)->Activate();
309 }
310
311 void ScopedTransformOverviewWindow::Close() { 305 void ScopedTransformOverviewWindow::Close() {
312 aura::Window* window = GetTransientRoot(window_); 306 aura::Window* window = GetTransientRoot(window_);
313 views::Widget::GetWidgetForNativeView(window)->Close(); 307 views::Widget::GetWidgetForNativeView(window)->Close();
314 } 308 }
315 309
316 void ScopedTransformOverviewWindow::PrepareForOverview() { 310 void ScopedTransformOverviewWindow::PrepareForOverview() {
317 DCHECK(!overview_started_); 311 DCHECK(!overview_started_);
318 overview_started_ = true; 312 overview_started_ = true;
319 wm::GetWindowState(window_)->set_ignored_by_shelf(true); 313 wm::GetWindowState(window_)->set_ignored_by_shelf(true);
320 ShowWindowIfMinimized(); 314 ShowWindowIfMinimized();
321 } 315 }
322 316
323 } // namespace ash 317 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/scoped_transform_overview_window.h ('k') | ash/wm/overview/transparent_activate_window_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698