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

Side by Side Diff: ui/aura/window.cc

Issue 280383009: Fixing invalid window opacity/visibility combination with the shelf (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
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 "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 const Window* root_window = GetRootWindow(); 331 const Window* root_window = GetRootWindow();
332 return root_window ? root_window->host_ : NULL; 332 return root_window ? root_window->host_ : NULL;
333 } 333 }
334 334
335 void Window::Show() { 335 void Window::Show() {
336 if (layer()) { 336 if (layer()) {
337 DCHECK_EQ(visible_, layer()->GetTargetVisibility()); 337 DCHECK_EQ(visible_, layer()->GetTargetVisibility());
338 // It is not allowed that a window is visible but the layers alpha is fully 338 // It is not allowed that a window is visible but the layers alpha is fully
339 // transparent since the window would still be considered to be active but 339 // transparent since the window would still be considered to be active but
340 // could not be seen. 340 // could not be seen.
341 // TODO(skuhne): uncomment and fix issue 351553. 341 DCHECK(!(visible_ && layer()->GetTargetOpacity() == 0.0f));
sky 2014/05/13 21:43:07 I think you should land this separately. That way
Mr4D (OOO till 08-26) 2014/05/13 22:08:17 Indeed! Thanks, good idea! Done.
342 // DCHECK(!(visible_ && layer()->GetTargetOpacity() == 0.0f));
343 } 342 }
344 SetVisible(true); 343 SetVisible(true);
345 } 344 }
346 345
347 void Window::Hide() { 346 void Window::Hide() {
348 // RootWindow::OnVisibilityChanged will call ReleaseCapture. 347 // RootWindow::OnVisibilityChanged will call ReleaseCapture.
349 SetVisible(false); 348 SetVisible(false);
350 } 349 }
351 350
352 bool Window::IsVisible() const { 351 bool Window::IsVisible() const {
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 return window; 1426 return window;
1428 if (offset) 1427 if (offset)
1429 *offset += window->bounds().OffsetFromOrigin(); 1428 *offset += window->bounds().OffsetFromOrigin();
1430 } 1429 }
1431 if (offset) 1430 if (offset)
1432 *offset = gfx::Vector2d(); 1431 *offset = gfx::Vector2d();
1433 return NULL; 1432 return NULL;
1434 } 1433 }
1435 1434
1436 } // namespace aura 1435 } // namespace aura
OLDNEW
« ash/shelf/shelf_layout_manager.cc ('K') | « ash/shelf/shelf_layout_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698