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

Side by Side Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2555373004: Apply new MD shadows to CrOS tray bubbles. (Closed)
Patch Set: . Created 4 years 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 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/common/system/chromeos/palette/palette_tray.h" 5 #include "ash/common/system/chromeos/palette/palette_tray.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 234
235 bool PaletteTray::ShowPalette() { 235 bool PaletteTray::ShowPalette() {
236 if (bubble_) 236 if (bubble_)
237 return false; 237 return false;
238 238
239 DCHECK(tray_container()); 239 DCHECK(tray_container());
240 240
241 views::TrayBubbleView::InitParams init_params(GetAnchorAlignment(), 241 views::TrayBubbleView::InitParams init_params(GetAnchorAlignment(),
242 kPaletteWidth, kPaletteWidth); 242 kPaletteWidth, kPaletteWidth);
243 init_params.can_activate = true;
244 init_params.close_on_deactivate = true; 243 init_params.close_on_deactivate = true;
245 244
246 DCHECK(tray_container()); 245 DCHECK(tray_container());
247 246
248 // The views::TrayBubbleView ctor will cause a shelf auto hide update check. 247 // The views::TrayBubbleView ctor will cause a shelf auto hide update check.
249 // Make sure to block auto hiding before that check happens. 248 // Make sure to block auto hiding before that check happens.
250 should_block_shelf_auto_hide_ = true; 249 should_block_shelf_auto_hide_ = true;
251 250
252 // TODO(tdanderson): Refactor into common row layout code. 251 // TODO(tdanderson): Refactor into common row layout code.
253 // TODO(tdanderson|jdufault): Add material design ripple effects to the menu 252 // TODO(tdanderson|jdufault): Add material design ripple effects to the menu
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 } else { 463 } else {
465 UpdateIconVisibility(); 464 UpdateIconVisibility();
466 } 465 }
467 } 466 }
468 467
469 void PaletteTray::UpdateIconVisibility() { 468 void PaletteTray::UpdateIconVisibility() {
470 SetVisible(is_palette_enabled_ && IsInUserSession()); 469 SetVisible(is_palette_enabled_ && IsInUserSession());
471 } 470 }
472 471
473 } // namespace ash 472 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698