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

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 10825146: Fix the volume and brightness bubble color issue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/system/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell/panel_window.h" 8 #include "ash/shell/panel_window.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/audio/tray_volume.h" 10 #include "ash/system/audio/tray_volume.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 if (bubble_.get() && creation_type == BUBBLE_USE_EXISTING) { 410 if (bubble_.get() && creation_type == BUBBLE_USE_EXISTING) {
411 bubble_->UpdateView(items, bubble_type); 411 bubble_->UpdateView(items, bubble_type);
412 } else { 412 } else {
413 bubble_.reset(new SystemTrayBubble(this, items, bubble_type)); 413 bubble_.reset(new SystemTrayBubble(this, items, bubble_type));
414 ash::SystemTrayDelegate* delegate = 414 ash::SystemTrayDelegate* delegate =
415 ash::Shell::GetInstance()->tray_delegate(); 415 ash::Shell::GetInstance()->tray_delegate();
416 views::View* anchor = tray_container_; 416 views::View* anchor = tray_container_;
417 TrayBubbleView::InitParams init_params(TrayBubbleView::ANCHOR_TYPE_TRAY, 417 TrayBubbleView::InitParams init_params(TrayBubbleView::ANCHOR_TYPE_TRAY,
418 shelf_alignment()); 418 shelf_alignment());
419 init_params.can_activate = can_activate; 419 init_params.can_activate = can_activate;
420 if (detailed) 420 if (detailed) {
421 // This is the case where a volume control or brightness control bubble
422 // is created.
421 init_params.max_height = default_bubble_height_; 423 init_params.max_height = default_bubble_height_;
424 init_params.arrow_color = kBackgroundColor;
425 }
422 init_params.arrow_offset = arrow_offset; 426 init_params.arrow_offset = arrow_offset;
423 bubble_->InitView(anchor, init_params, delegate->GetUserLoginStatus()); 427 bubble_->InitView(anchor, init_params, delegate->GetUserLoginStatus());
424 } 428 }
425 // Save height of default view for creating detailed views directly. 429 // Save height of default view for creating detailed views directly.
426 if (!detailed) 430 if (!detailed)
427 default_bubble_height_ = bubble_->bubble_view()->height(); 431 default_bubble_height_ = bubble_->bubble_view()->height();
428 432
429 if (detailed && items.size() > 0) 433 if (detailed && items.size() > 0)
430 detailed_item_ = items[0]; 434 detailed_item_ = items[0];
431 else 435 else
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 579
576 void SystemTray::OnPaintFocusBorder(gfx::Canvas* canvas) { 580 void SystemTray::OnPaintFocusBorder(gfx::Canvas* canvas) {
577 // The tray itself expands to the right and bottom edge of the screen to make 581 // The tray itself expands to the right and bottom edge of the screen to make
578 // sure clicking on the edges brings up the popup. However, the focus border 582 // sure clicking on the edges brings up the popup. However, the focus border
579 // should be only around the container. 583 // should be only around the container.
580 if (GetWidget() && GetWidget()->IsActive()) 584 if (GetWidget() && GetWidget()->IsActive())
581 DrawBorder(canvas, GetContentsBounds()); 585 DrawBorder(canvas, GetContentsBounds());
582 } 586 }
583 587
584 } // namespace ash 588 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698