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

Side by Side Diff: ash/common/system/chromeos/brightness/tray_brightness.cc

Issue 2491033006: Adjust positioning of cros tray bubbles. (Closed)
Patch Set: rebase and update bug link Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/brightness/tray_brightness.h" 5 #include "ash/common/system/chromeos/brightness/tray_brightness.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/shell_observer.h" 10 #include "ash/common/shell_observer.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 brightness_view_ = NULL; 240 brightness_view_ = NULL;
241 } 241 }
242 242
243 void TrayBrightness::DestroyDetailedView() { 243 void TrayBrightness::DestroyDetailedView() {
244 if (brightness_view_ && !brightness_view_->is_default_view()) 244 if (brightness_view_ && !brightness_view_->is_default_view())
245 brightness_view_ = NULL; 245 brightness_view_ = NULL;
246 } 246 }
247 247
248 void TrayBrightness::UpdateAfterLoginStatusChange(LoginStatus status) {} 248 void TrayBrightness::UpdateAfterLoginStatusChange(LoginStatus status) {}
249 249
250 bool TrayBrightness::ShouldHideArrow() const {
251 return true;
252 }
253
254 bool TrayBrightness::ShouldShowShelf() const { 250 bool TrayBrightness::ShouldShowShelf() const {
255 return false; 251 return false;
256 } 252 }
257 253
258 void TrayBrightness::BrightnessChanged(int level, bool user_initiated) { 254 void TrayBrightness::BrightnessChanged(int level, bool user_initiated) {
259 WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_BRIGHTNESS_CHANGED); 255 WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_BRIGHTNESS_CHANGED);
260 double percent = static_cast<double>(level); 256 double percent = static_cast<double>(level);
261 HandleBrightnessChanged(percent, user_initiated); 257 HandleBrightnessChanged(percent, user_initiated);
262 } 258 }
263 259
(...skipping 14 matching lines...) Expand all
278 if (!display::Display::HasInternalDisplay()) 274 if (!display::Display::HasInternalDisplay())
279 return; 275 return;
280 276
281 if (brightness_view_) 277 if (brightness_view_)
282 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); 278 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
283 else 279 else
284 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 280 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
285 } 281 }
286 282
287 } // namespace ash 283 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698