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

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

Issue 8555025: aura: Draw drop shadows under browsers and menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor changes 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_observer.h » ('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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 if (!window || !stacking_client_->CanActivateWindow(window)) 375 if (!window || !stacking_client_->CanActivateWindow(window))
376 return; 376 return;
377 if (active_window_ != window) 377 if (active_window_ != window)
378 return; 378 return;
379 379
380 Window* to_activate = stacking_client_->GetTopmostWindowToActivate(window); 380 Window* to_activate = stacking_client_->GetTopmostWindowToActivate(window);
381 if (to_activate) 381 if (to_activate)
382 SetActiveWindow(to_activate, NULL); 382 SetActiveWindow(to_activate, NULL);
383 } 383 }
384 384
385 void Desktop::WindowInitialized(Window* window) {
386 FOR_EACH_OBSERVER(DesktopObserver, observers_, OnWindowInitialized(window));
387 }
388
385 void Desktop::WindowDestroying(Window* window) { 389 void Desktop::WindowDestroying(Window* window) {
386 // Update the focused window state if the window was focused. 390 // Update the focused window state if the window was focused.
387 if (focused_window_ == window) 391 if (focused_window_ == window)
388 SetFocusedWindow(NULL); 392 SetFocusedWindow(NULL);
389 393
390 // When a window is being destroyed it's likely that the WindowDelegate won't 394 // When a window is being destroyed it's likely that the WindowDelegate won't
391 // want events, so we reset the mouse_pressed_handler_ and capture_window_ and 395 // want events, so we reset the mouse_pressed_handler_ and capture_window_ and
392 // don't sent it release/capture lost events. 396 // don't sent it release/capture lost events.
393 if (mouse_pressed_handler_ == window) 397 if (mouse_pressed_handler_ == window)
394 mouse_pressed_handler_ = NULL; 398 mouse_pressed_handler_ = NULL;
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { 629 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
626 bounds.set_size(gfx::Size(parsed_width, parsed_height)); 630 bounds.set_size(gfx::Size(parsed_width, parsed_height));
627 } else if (use_fullscreen_host_window_) { 631 } else if (use_fullscreen_host_window_) {
628 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize()); 632 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize());
629 } 633 }
630 634
631 return bounds; 635 return bounds;
632 } 636 }
633 637
634 } // namespace aura 638 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/desktop.h ('k') | ui/aura/desktop_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698