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

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

Issue 8565015: Avoid trying to layout the desktop when its size is set to 0x0 when minimized on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « ui/aura/desktop.h ('k') | ui/aura/desktop_host_win.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/desktop.h" 5 #include "ui/aura/desktop.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // The layer, and all the observers should be notified of the 316 // The layer, and all the observers should be notified of the
317 // transformed size of the desktop. 317 // transformed size of the desktop.
318 gfx::Rect bounds(size); 318 gfx::Rect bounds(size);
319 layer()->transform().TransformRect(&bounds); 319 layer()->transform().TransformRect(&bounds);
320 SetBounds(gfx::Rect(bounds.size())); 320 SetBounds(gfx::Rect(bounds.size()));
321 FOR_EACH_OBSERVER(DesktopObserver, observers_, 321 FOR_EACH_OBSERVER(DesktopObserver, observers_,
322 OnDesktopResized(bounds.size())); 322 OnDesktopResized(bounds.size()));
323 } 323 }
324 324
325 void Desktop::SetActiveWindow(Window* window, Window* to_focus) { 325 void Desktop::SetActiveWindow(Window* window, Window* to_focus) {
326 if (!window)
sky 2011/11/14 21:12:21 Don't we use this to clear the active window? Say
327 return;
326 // The stacking client may impose rules on what window configurations can be 328 // The stacking client may impose rules on what window configurations can be
327 // activated or deactivated. 329 // activated or deactivated.
328 if (window && !stacking_client_->CanActivateWindow(window)) 330 if (!stacking_client_->CanActivateWindow(window))
329 return; 331 return;
330 // The window may not be activate-able. 332 // The window may not be activate-able.
331 if (window && !window->CanActivate()) 333 if (!window->CanActivate())
332 return; 334 return;
333 // Nothing may actually have changed. 335 // Nothing may actually have changed.
334 if (active_window_ == window) 336 if (active_window_ == window)
335 return; 337 return;
336 338
337 Window* old_active = active_window_; 339 Window* old_active = active_window_;
338 active_window_ = window; 340 active_window_ = window;
339 // Invoke OnLostActive after we've changed the active window. That way if the 341 // Invoke OnLostActive after we've changed the active window. That way if the
340 // delegate queries for active state it doesn't think the window is still 342 // delegate queries for active state it doesn't think the window is still
341 // active. 343 // active.
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { 606 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
605 bounds.set_size(gfx::Size(parsed_width, parsed_height)); 607 bounds.set_size(gfx::Size(parsed_width, parsed_height));
606 } else if (use_fullscreen_host_window_) { 608 } else if (use_fullscreen_host_window_) {
607 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize()); 609 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize());
608 } 610 }
609 611
610 return bounds; 612 return bounds;
611 } 613 }
612 614
613 } // namespace aura 615 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/desktop.h ('k') | ui/aura/desktop_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698