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

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: rebase 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 layer()->GetAnimator()->RemoveObserver(this);
Ben Goodger (Google) 2011/12/08 17:14:17 You should add a comment here that an observer may
Yusuke Sato 2011/12/09 01:50:59 Done.
437 #ifdef USE_WEBKIT_COMPOSITOR 438 #ifdef USE_WEBKIT_COMPOSITOR
438 if (!ui::Compositor::compositor_factory()) 439 if (!ui::Compositor::compositor_factory())
439 ui::CompositorCC::Terminate(); 440 ui::CompositorCC::Terminate();
440 #endif 441 #endif
441 if (instance_ == this) 442 if (instance_ == this)
442 instance_ = NULL; 443 instance_ = NULL;
443 } 444 }
444 445
445 void RootWindow::HandleMouseMoved(const MouseEvent& event, Window* target) { 446 void RootWindow::HandleMouseMoved(const MouseEvent& event, Window* target) {
446 if (target == mouse_moved_handler_) 447 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) { 606 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
606 bounds.set_size(gfx::Size(parsed_width, parsed_height)); 607 bounds.set_size(gfx::Size(parsed_width, parsed_height));
607 } else if (use_fullscreen_host_window_) { 608 } else if (use_fullscreen_host_window_) {
608 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize()); 609 bounds = gfx::Rect(RootWindowHost::GetNativeScreenSize());
609 } 610 }
610 611
611 return bounds; 612 return bounds;
612 } 613 }
613 614
614 } // namespace aura 615 } // 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