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

Side by Side Diff: ash/common/system/tray/system_tray.h

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble Created 4 years, 3 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
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 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_
6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
13 #include "ash/common/system/tray/system_tray_bubble.h" 13 #include "ash/common/system/tray/system_tray_bubble.h"
14 #include "ash/common/system/tray/tray_background_view.h" 14 #include "ash/common/system/tray/tray_background_view.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/scoped_vector.h" 16 #include "base/memory/scoped_vector.h"
17 #include "ui/views/bubble/tray_bubble_view.h" 17 #include "ui/views/bubble/tray_bubble_view.h"
18 #include "ui/views/view.h" 18 #include "ui/views/view.h"
19 19
20 namespace ash { 20 namespace ash {
21 21
22 class KeyEventWatcher;
22 enum class LoginStatus; 23 enum class LoginStatus;
23 class ScreenTrayItem; 24 class ScreenTrayItem;
24 class SystemBubbleWrapper; 25 class SystemBubbleWrapper;
25 class SystemTrayDelegate; 26 class SystemTrayDelegate;
26 class SystemTrayItem; 27 class SystemTrayItem;
27 class TrayAccessibility; 28 class TrayAccessibility;
28 class TrayAudio; 29 class TrayAudio;
29 class TrayCast; 30 class TrayCast;
30 class TrayDate; 31 class TrayDate;
31 class TrayUpdate; 32 class TrayUpdate;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 return tray_accessibility_; 161 return tray_accessibility_;
161 } 162 }
162 163
163 // Get the tray item view (or NULL) for a given |tray_item| in a unit test. 164 // Get the tray item view (or NULL) for a given |tray_item| in a unit test.
164 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item); 165 views::View* GetTrayItemViewForTest(SystemTrayItem* tray_item);
165 166
166 TrayCast* GetTrayCastForTesting() const; 167 TrayCast* GetTrayCastForTesting() const;
167 TrayDate* GetTrayDateForTesting() const; 168 TrayDate* GetTrayDateForTesting() const;
168 TrayUpdate* GetTrayUpdateForTesting() const; 169 TrayUpdate* GetTrayUpdateForTesting() const;
169 170
171 // Activate the system tay bubble.
James Cook 2016/09/22 21:17:16 nit: tay -> tray
oshima 2016/09/23 09:37:20 Done.
172 void ActivateBubble();
173
170 private: 174 private:
175 void CloseBubble(const ui::KeyEvent& key_event);
James Cook 2016/09/22 21:17:16 nit: document. For example, why is it different th
oshima 2016/09/23 09:37:20 Done.
176
177 // Acitavates the bubble and starts key navigation with the |key_event|.
James Cook 2016/09/22 21:17:16 nit: activates
oshima 2016/09/23 09:37:20 Done.
178 void ActivateAndStartNavigation(const ui::KeyEvent& key_event);
179
171 // Creates the default set of items for the sytem tray. 180 // Creates the default set of items for the sytem tray.
172 void CreateItems(SystemTrayDelegate* delegate); 181 void CreateItems(SystemTrayDelegate* delegate);
173 182
174 // Resets |system_bubble_| and clears any related state. 183 // Resets |system_bubble_| and clears any related state.
175 void DestroySystemBubble(); 184 void DestroySystemBubble();
176 185
177 // Resets |notification_bubble_| and clears any related state. 186 // Resets |notification_bubble_| and clears any related state.
178 void DestroyNotificationBubble(); 187 void DestroyNotificationBubble();
179 188
180 // Returns a string with the current time for accessibility on the status 189 // Returns a string with the current time for accessibility on the status
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 TrayAccessibility* tray_accessibility_; 265 TrayAccessibility* tray_accessibility_;
257 TrayAudio* tray_audio_; // May be null. 266 TrayAudio* tray_audio_; // May be null.
258 TrayCast* tray_cast_; 267 TrayCast* tray_cast_;
259 TrayDate* tray_date_; 268 TrayDate* tray_date_;
260 TrayUpdate* tray_update_; 269 TrayUpdate* tray_update_;
261 270
262 // A reference to the Screen share and capture item. 271 // A reference to the Screen share and capture item.
263 ScreenTrayItem* screen_capture_tray_item_; // not owned 272 ScreenTrayItem* screen_capture_tray_item_; // not owned
264 ScreenTrayItem* screen_share_tray_item_; // not owned 273 ScreenTrayItem* screen_share_tray_item_; // not owned
265 274
275 std::unique_ptr<KeyEventWatcher> key_event_watcher_;
276
266 DISALLOW_COPY_AND_ASSIGN(SystemTray); 277 DISALLOW_COPY_AND_ASSIGN(SystemTray);
267 }; 278 };
268 279
269 } // namespace ash 280 } // namespace ash
270 281
271 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_ 282 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698