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

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

Issue 249063003: Revert of Remove remaining window states where window is shown with opacity 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | no next file » | 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 "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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 const Window* root_window = GetRootWindow(); 332 const Window* root_window = GetRootWindow();
333 return root_window ? root_window->host_ : NULL; 333 return root_window ? root_window->host_ : NULL;
334 } 334 }
335 335
336 void Window::Show() { 336 void Window::Show() {
337 if (layer()) { 337 if (layer()) {
338 DCHECK_EQ(visible_, layer()->GetTargetVisibility()); 338 DCHECK_EQ(visible_, layer()->GetTargetVisibility());
339 // It is not allowed that a window is visible but the layers alpha is fully 339 // It is not allowed that a window is visible but the layers alpha is fully
340 // transparent since the window would still be considered to be active but 340 // transparent since the window would still be considered to be active but
341 // could not be seen. 341 // could not be seen.
342 DCHECK(!(visible_ && layer()->GetTargetOpacity() == 0.0f)); 342 // TODO(skuhne): uncomment and fix issue 351553.
343 // DCHECK(!(visible_ && layer()->GetTargetOpacity() == 0.0f));
343 } 344 }
344 SetVisible(true); 345 SetVisible(true);
345 } 346 }
346 347
347 void Window::Hide() { 348 void Window::Hide() {
348 // RootWindow::OnVisibilityChanged will call ReleaseCapture. 349 // RootWindow::OnVisibilityChanged will call ReleaseCapture.
349 SetVisible(false); 350 SetVisible(false);
350 } 351 }
351 352
352 bool Window::IsVisible() const { 353 bool Window::IsVisible() const {
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 return window; 1436 return window;
1436 if (offset) 1437 if (offset)
1437 *offset += window->bounds().OffsetFromOrigin(); 1438 *offset += window->bounds().OffsetFromOrigin();
1438 } 1439 }
1439 if (offset) 1440 if (offset)
1440 *offset = gfx::Vector2d(); 1441 *offset = gfx::Vector2d();
1441 return NULL; 1442 return NULL;
1442 } 1443 }
1443 1444
1444 } // namespace aura 1445 } // namespace aura
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698