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

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

Issue 2814243002: Removes a couple more functions from WmWindow (Closed)
Patch Set: feedback Created 3 years, 8 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
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/tray/tray_event_filter.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) 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 <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // WmActivationObserver: 174 // WmActivationObserver:
175 void OnWindowActivated(ActivationReason reason, 175 void OnWindowActivated(ActivationReason reason,
176 aura::Window* gained_active, 176 aura::Window* gained_active,
177 aura::Window* lost_active) override { 177 aura::Window* lost_active) override {
178 if (!tray_->HasSystemBubble() || !gained_active) 178 if (!tray_->HasSystemBubble() || !gained_active)
179 return; 179 return;
180 180
181 WmWindow* wm_gained_active = WmWindow::Get(gained_active); 181 WmWindow* wm_gained_active = WmWindow::Get(gained_active);
182 int container_id = 182 int container_id =
183 wm::GetContainerForWindow(wm_gained_active)->GetShellWindowId(); 183 wm::GetContainerForWindow(wm_gained_active)->aura_window()->id();
184 184
185 // Don't close the bubble if a popup notification is activated. 185 // Don't close the bubble if a popup notification is activated.
186 if (container_id == kShellWindowId_StatusContainer) 186 if (container_id == kShellWindowId_StatusContainer)
187 return; 187 return;
188 188
189 views::Widget* bubble_widget = 189 views::Widget* bubble_widget =
190 tray_->GetSystemBubble()->bubble_view()->GetWidget(); 190 tray_->GetSystemBubble()->bubble_view()->GetWidget();
191 // Don't close the bubble if a transient child is gaining or losing 191 // Don't close the bubble if a transient child is gaining or losing
192 // activation. 192 // activation.
193 if (bubble_widget == GetInternalWidgetForWindow(gained_active) || 193 if (bubble_widget == GetInternalWidgetForWindow(gained_active) ||
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 .work_area() 743 .work_area()
744 .height(); 744 .height();
745 if (work_area_height > 0) { 745 if (work_area_height > 0) {
746 UMA_HISTOGRAM_CUSTOM_COUNTS( 746 UMA_HISTOGRAM_CUSTOM_COUNTS(
747 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", 747 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu",
748 100 * bubble_view->height() / work_area_height, 1, 300, 100); 748 100 * bubble_view->height() / work_area_height, 1, 300, 100);
749 } 749 }
750 } 750 }
751 751
752 } // namespace ash 752 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/tray/tray_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698