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

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 10857009: Makes SystemTray explicitly remove an AnimationObserver. Without this (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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) 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 "ash/system/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell/panel_window.h" 8 #include "ash/shell/panel_window.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/audio/tray_volume.h" 10 #include "ash/system/audio/tray_volume.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 hide_notifications_(false) { 106 hide_notifications_(false) {
107 } 107 }
108 108
109 SystemTray::~SystemTray() { 109 SystemTray::~SystemTray() {
110 bubble_.reset(); 110 bubble_.reset();
111 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); 111 for (std::vector<SystemTrayItem*>::iterator it = items_.begin();
112 it != items_.end(); 112 it != items_.end();
113 ++it) { 113 ++it) {
114 (*it)->DestroyTrayView(); 114 (*it)->DestroyTrayView();
115 } 115 }
116 GetWidget()->GetNativeView()->layer()->GetAnimator()->RemoveObserver(
117 layer_animation_observer_.get());
116 } 118 }
117 119
118 void SystemTray::Initialize() { 120 void SystemTray::Initialize() {
119 layer_animation_observer_.reset(new SystemTrayLayerAnimationObserver(this)); 121 layer_animation_observer_.reset(new SystemTrayLayerAnimationObserver(this));
120 GetWidget()->GetNativeView()->layer()->GetAnimator()->AddObserver( 122 GetWidget()->GetNativeView()->layer()->GetAnimator()->AddObserver(
121 layer_animation_observer_.get()); 123 layer_animation_observer_.get());
122 } 124 }
123 125
124 void SystemTray::CreateItems() { 126 void SystemTray::CreateItems() {
125 internal::TrayVolume* tray_volume = new internal::TrayVolume(); 127 internal::TrayVolume* tray_volume = new internal::TrayVolume();
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 505
504 void SystemTray::OnPaintFocusBorder(gfx::Canvas* canvas) { 506 void SystemTray::OnPaintFocusBorder(gfx::Canvas* canvas) {
505 // The tray itself expands to the right and bottom edge of the screen to make 507 // The tray itself expands to the right and bottom edge of the screen to make
506 // sure clicking on the edges brings up the popup. However, the focus border 508 // sure clicking on the edges brings up the popup. However, the focus border
507 // should be only around the container. 509 // should be only around the container.
508 if (GetWidget() && GetWidget()->IsActive()) 510 if (GetWidget() && GetWidget()->IsActive())
509 DrawBorder(canvas, GetContentsBounds()); 511 DrawBorder(canvas, GetContentsBounds());
510 } 512 }
511 513
512 } // namespace ash 514 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698