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

Side by Side Diff: ash/accelerators/accelerator_controller_delegate_aura.cc

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble by default 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
« no previous file with comments | « ash/BUILD.gn ('k') | ash/aura/key_event_watcher_aura.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/accelerators/accelerator_controller_delegate_aura.h" 5 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 active_window->layer()->GetAnimator()->StartAnimation( 190 active_window->layer()->GetAnimator()->StartAnimation(
191 new ui::LayerAnimationSequence( 191 new ui::LayerAnimationSequence(
192 new WindowRotation(360, active_window->layer()))); 192 new WindowRotation(360, active_window->layer())));
193 } 193 }
194 } 194 }
195 195
196 void HandleShowSystemTrayBubble() { 196 void HandleShowSystemTrayBubble() {
197 base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble")); 197 base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble"));
198 RootWindowController* controller = 198 RootWindowController* controller =
199 RootWindowController::ForTargetRootWindow(); 199 RootWindowController::ForTargetRootWindow();
200 if (!controller->GetSystemTray()->HasSystemBubble()) 200 SystemTray* tray = controller->GetSystemTray();
201 controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); 201 if (!tray->HasSystemBubble()) {
202 tray->ShowDefaultView(BUBBLE_CREATE_NEW);
203 tray->ActivateBubble();
204 }
202 } 205 }
203 206
204 void HandleTakeWindowScreenshot(ScreenshotDelegate* screenshot_delegate) { 207 void HandleTakeWindowScreenshot(ScreenshotDelegate* screenshot_delegate) {
205 base::RecordAction(UserMetricsAction("Accel_Take_Window_Screenshot")); 208 base::RecordAction(UserMetricsAction("Accel_Take_Window_Screenshot"));
206 DCHECK(screenshot_delegate); 209 DCHECK(screenshot_delegate);
207 Shell::GetInstance()->screenshot_controller()->StartWindowScreenshotSession( 210 Shell::GetInstance()->screenshot_controller()->StartWindowScreenshotSession(
208 screenshot_delegate); 211 screenshot_delegate);
209 } 212 }
210 213
211 void HandleTakePartialScreenshot(ScreenshotDelegate* screenshot_delegate) { 214 void HandleTakePartialScreenshot(ScreenshotDelegate* screenshot_delegate) {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 message_center::NotifierId( 502 message_center::NotifierId(
500 message_center::NotifierId::SYSTEM_COMPONENT, 503 message_center::NotifierId::SYSTEM_COMPONENT,
501 system_notifier::kNotifierDeprecatedAccelerator), 504 system_notifier::kNotifierDeprecatedAccelerator),
502 message_center::RichNotificationData(), 505 message_center::RichNotificationData(),
503 new DeprecatedAcceleratorNotificationDelegate)); 506 new DeprecatedAcceleratorNotificationDelegate));
504 message_center::MessageCenter::Get()->AddNotification( 507 message_center::MessageCenter::Get()->AddNotification(
505 std::move(notification)); 508 std::move(notification));
506 } 509 }
507 510
508 } // namespace ash 511 } // namespace ash
OLDNEW
« no previous file with comments | « ash/BUILD.gn ('k') | ash/aura/key_event_watcher_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698