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

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

Issue 138003007: [Cleanup] Screen cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make sure screen_for_shutdown is reset everytime Created 6 years, 11 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 | « ash/system/chromeos/tray_display_unittest.cc ('k') | ash/test/ash_test_base.cc » ('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 (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/tray_background_view.h" 5 #include "ash/system/tray/tray_background_view.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_util.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
11 #include "ash/shelf/shelf_widget.h" 11 #include "ash/shelf/shelf_widget.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/shell_window_ids.h" 13 #include "ash/shell_window_ids.h"
14 #include "ash/system/status_area_widget.h" 14 #include "ash/system/status_area_widget.h"
15 #include "ash/system/status_area_widget_delegate.h" 15 #include "ash/system/status_area_widget_delegate.h"
16 #include "ash/system/tray/system_tray.h" 16 #include "ash/system/tray/system_tray.h"
17 #include "ash/system/tray/tray_constants.h" 17 #include "ash/system/tray/tray_constants.h"
18 #include "ash/system/tray/tray_event_filter.h" 18 #include "ash/system/tray/tray_event_filter.h"
19 #include "ash/wm/window_animations.h" 19 #include "ash/wm/window_animations.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 if (rect.IsEmpty()) { 573 if (rect.IsEmpty()) {
574 aura::Window* target_root = anchor_widget ? 574 aura::Window* target_root = anchor_widget ?
575 anchor_widget->GetNativeView()->GetRootWindow() : 575 anchor_widget->GetNativeView()->GetRootWindow() :
576 Shell::GetPrimaryRootWindow(); 576 Shell::GetPrimaryRootWindow();
577 rect = target_root->bounds(); 577 rect = target_root->bounds();
578 rect = gfx::Rect( 578 rect = gfx::Rect(
579 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreenBottomAlignment : 579 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreenBottomAlignment :
580 rect.width() - kPaddingFromRightEdgeOfScreenBottomAlignment, 580 rect.width() - kPaddingFromRightEdgeOfScreenBottomAlignment,
581 rect.height() - kPaddingFromBottomOfScreenBottomAlignment, 581 rect.height() - kPaddingFromBottomOfScreenBottomAlignment,
582 0, 0); 582 0, 0);
583 rect = ScreenAsh::ConvertRectToScreen(target_root, rect); 583 rect = ScreenUtil::ConvertRectToScreen(target_root, rect);
584 } 584 }
585 return rect; 585 return rect;
586 } 586 }
587 587
588 TrayBubbleView::AnchorAlignment TrayBackgroundView::GetAnchorAlignment() const { 588 TrayBubbleView::AnchorAlignment TrayBackgroundView::GetAnchorAlignment() const {
589 switch (shelf_alignment_) { 589 switch (shelf_alignment_) {
590 case SHELF_ALIGNMENT_BOTTOM: 590 case SHELF_ALIGNMENT_BOTTOM:
591 return TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM; 591 return TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM;
592 case SHELF_ALIGNMENT_LEFT: 592 case SHELF_ALIGNMENT_LEFT:
593 return TrayBubbleView::ANCHOR_ALIGNMENT_LEFT; 593 return TrayBubbleView::ANCHOR_ALIGNMENT_LEFT;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 ash::internal::ShelfLayoutManager* shelf = 625 ash::internal::ShelfLayoutManager* shelf =
626 ShelfLayoutManager::ForShelf(root_window); 626 ShelfLayoutManager::ForShelf(root_window);
627 bubble_view->SetArrowPaintType( 627 bubble_view->SetArrowPaintType(
628 (shelf && shelf->IsVisible()) ? 628 (shelf && shelf->IsVisible()) ?
629 views::BubbleBorder::PAINT_NORMAL : 629 views::BubbleBorder::PAINT_NORMAL :
630 views::BubbleBorder::PAINT_TRANSPARENT); 630 views::BubbleBorder::PAINT_TRANSPARENT);
631 } 631 }
632 632
633 } // namespace internal 633 } // namespace internal
634 } // namespace ash 634 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/tray_display_unittest.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698