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

Side by Side Diff: ash/common/system/tray/tray_event_filter.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/common/system/tray/tray_empty.cc ('k') | ash/common/system/tray/tray_image_item.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/common/system/tray/tray_event_filter.h" 5 #include "ash/common/system/tray/tray_event_filter.h"
6 6
7 #include "ash/common/shell_window_ids.h" 7 #include "ash/common/shell_window_ids.h"
8 #include "ash/common/system/tray/tray_background_view.h" 8 #include "ash/common/system/tray/tray_background_view.h"
9 #include "ash/common/system/tray/tray_bubble_wrapper.h" 9 #include "ash/common/system/tray/tray_bubble_wrapper.h"
10 #include "ash/common/wm/container_finder.h" 10 #include "ash/common/wm/container_finder.h"
11 #include "ash/common/wm_lookup.h" 11 #include "ash/common/wm_lookup.h"
12 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
13 #include "ash/common/wm_window.h" 13 #include "ash/common/wm_window.h"
14 #include "ui/views/widget/widget.h" 14 #include "ui/views/widget/widget.h"
15 15
16 namespace ash { 16 namespace ash {
17 17
18 TrayEventFilter::TrayEventFilter() { 18 TrayEventFilter::TrayEventFilter() {}
19 }
20 19
21 TrayEventFilter::~TrayEventFilter() { 20 TrayEventFilter::~TrayEventFilter() {
22 DCHECK(wrappers_.empty()); 21 DCHECK(wrappers_.empty());
23 } 22 }
24 23
25 void TrayEventFilter::AddWrapper(TrayBubbleWrapper* wrapper) { 24 void TrayEventFilter::AddWrapper(TrayBubbleWrapper* wrapper) {
26 bool was_empty = wrappers_.empty(); 25 bool was_empty = wrappers_.empty();
27 wrappers_.insert(wrapper); 26 wrappers_.insert(wrapper);
28 if (was_empty && !wrappers_.empty()) 27 if (was_empty && !wrappers_.empty())
29 WmShell::Get()->AddPointerWatcher(this); 28 WmShell::Get()->AddPointerWatcher(this);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 iter != wrappers_.end(); ++iter) { 91 iter != wrappers_.end(); ++iter) {
93 trays.insert((*iter)->tray()); 92 trays.insert((*iter)->tray());
94 } 93 }
95 for (std::set<TrayBackgroundView*>::iterator iter = trays.begin(); 94 for (std::set<TrayBackgroundView*>::iterator iter = trays.begin();
96 iter != trays.end(); ++iter) { 95 iter != trays.end(); ++iter) {
97 (*iter)->ClickedOutsideBubble(); 96 (*iter)->ClickedOutsideBubble();
98 } 97 }
99 } 98 }
100 99
101 } // namespace ash 100 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_empty.cc ('k') | ash/common/system/tray/tray_image_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698