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

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

Issue 8816008: Remove aura::RootWindow instance from LayerAnimator::observers_ when the window is deleted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 9 years 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 | « no previous file | ui/aura_shell/shell_accelerator_controller_unittest.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/root_window.h" 5 #include "ui/aura/root_window.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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 host_->GetSize()); 427 host_->GetSize());
428 } 428 }
429 DCHECK(compositor_.get()); 429 DCHECK(compositor_.get());
430 } 430 }
431 431
432 RootWindow::~RootWindow() { 432 RootWindow::~RootWindow() {
433 in_destructor_ = true; 433 in_destructor_ = true;
434 // Make sure to destroy the compositor before terminating so that state is 434 // Make sure to destroy the compositor before terminating so that state is
435 // cleared and we don't hit asserts. 435 // cleared and we don't hit asserts.
436 compositor_ = NULL; 436 compositor_ = NULL;
437 // An observer may have been added by an animation on the RootWindow.
438 layer()->GetAnimator()->RemoveObserver(this);
437 #ifdef USE_WEBKIT_COMPOSITOR 439 #ifdef USE_WEBKIT_COMPOSITOR
438 if (!ui::Compositor::compositor_factory()) 440 if (!ui::Compositor::compositor_factory())
439 ui::CompositorCC::Terminate(); 441 ui::CompositorCC::Terminate();
440 #endif 442 #endif
441 if (instance_ == this) 443 if (instance_ == this)
442 instance_ = NULL; 444 instance_ = NULL;
443 } 445 }
444 446
445 void RootWindow::HandleMouseMoved(const MouseEvent& event, Window* target) { 447 void RootWindow::HandleMouseMoved(const MouseEvent& event, Window* target) {
446 if (target == mouse_moved_handler_) 448 if (target == mouse_moved_handler_)
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { 607 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
606 bounds.set_size(gfx::Size(parsed_width, parsed_height)); 608 bounds.set_size(gfx::Size(parsed_width, parsed_height));
607 } else if (use_fullscreen_host_window_) { 609 } else if (use_fullscreen_host_window_) {
608 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); 610 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize());
609 } 611 }
610 612
611 return bounds; 613 return bounds;
612 } 614 }
613 615
614 } // namespace aura 616 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/aura_shell/shell_accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698