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

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

Issue 237963019: Remove remaining window states where window is shown with opacity 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove forced relayouts in unittests after adding panel shelf icons. 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
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 WindowTreeHost* Window::GetHost() const { 331 const WindowTreeHost* Window::GetHost() const {
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.
Mr4D (OOO till 08-26) 2014/04/22 14:45:54 Yippieh! (let's see what was not covered by unit t
342 // TODO(skuhne): uncomment and fix issue 351553. 342 DCHECK(!(visible_ && layer()->GetTargetOpacity() == 0.0f));
343 // DCHECK(!(visible_ && layer()->GetTargetOpacity() == 0.0f));
344 } 343 }
345 SetVisible(true); 344 SetVisible(true);
346 } 345 }
347 346
348 void Window::Hide() { 347 void Window::Hide() {
349 // RootWindow::OnVisibilityChanged will call ReleaseCapture. 348 // RootWindow::OnVisibilityChanged will call ReleaseCapture.
350 SetVisible(false); 349 SetVisible(false);
351 } 350 }
352 351
353 bool Window::IsVisible() const { 352 bool Window::IsVisible() const {
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 return window; 1435 return window;
1437 if (offset) 1436 if (offset)
1438 *offset += window->bounds().OffsetFromOrigin(); 1437 *offset += window->bounds().OffsetFromOrigin();
1439 } 1438 }
1440 if (offset) 1439 if (offset)
1441 *offset = gfx::Vector2d(); 1440 *offset = gfx::Vector2d();
1442 return NULL; 1441 return NULL;
1443 } 1442 }
1444 1443
1445 } // namespace aura 1444 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698