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

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

Issue 2092473002: Convert TrayBubbleView to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@traybubblewrapper
Patch Set: review feedback Created 4 years, 6 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
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/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/shelf/shelf_constants.h" 8 #include "ash/common/shelf/shelf_constants.h"
9 #include "ash/common/shelf/wm_shelf.h" 9 #include "ash/common/shelf/wm_shelf.h"
10 #include "ash/common/shelf/wm_shelf_util.h" 10 #include "ash/common/shelf/wm_shelf_util.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 void TrayBackgroundView::HideTransformation() { 417 void TrayBackgroundView::HideTransformation() {
418 gfx::Transform transform; 418 gfx::Transform transform;
419 if (IsHorizontalAlignment(shelf_alignment_)) 419 if (IsHorizontalAlignment(shelf_alignment_))
420 transform.Translate(width(), 0.0f); 420 transform.Translate(width(), 0.0f);
421 else 421 else
422 transform.Translate(0.0f, height()); 422 transform.Translate(0.0f, height());
423 layer()->SetTransform(transform); 423 layer()->SetTransform(transform);
424 } 424 }
425 425
426 aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const {
427 return ash::Shell::GetContainer(
428 tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(),
429 ash::kShellWindowId_SettingBubbleContainer);
430 }
431
432 gfx::Rect TrayBackgroundView::GetBubbleAnchorRect( 426 gfx::Rect TrayBackgroundView::GetBubbleAnchorRect(
433 views::Widget* anchor_widget, 427 views::Widget* anchor_widget,
434 TrayBubbleView::AnchorType anchor_type, 428 TrayBubbleView::AnchorType anchor_type,
435 TrayBubbleView::AnchorAlignment anchor_alignment) const { 429 TrayBubbleView::AnchorAlignment anchor_alignment) const {
436 gfx::Rect rect; 430 gfx::Rect rect;
437 if (anchor_widget && anchor_widget->IsVisible()) { 431 if (anchor_widget && anchor_widget->IsVisible()) {
438 rect = anchor_widget->GetWindowBoundsInScreen(); 432 rect = anchor_widget->GetWindowBoundsInScreen();
439 if (anchor_type == TrayBubbleView::ANCHOR_TYPE_TRAY) { 433 if (anchor_type == TrayBubbleView::ANCHOR_TYPE_TRAY) {
440 if (anchor_alignment == TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM) { 434 if (anchor_alignment == TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM) {
441 bool rtl = base::i18n::IsRTL(); 435 bool rtl = base::i18n::IsRTL();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 return; 521 return;
528 SchedulePaint(); 522 SchedulePaint();
529 } 523 }
530 524
531 void TrayBackgroundView::UpdateBubbleViewArrow( 525 void TrayBackgroundView::UpdateBubbleViewArrow(
532 views::TrayBubbleView* bubble_view) { 526 views::TrayBubbleView* bubble_view) {
533 // Nothing to do here. 527 // Nothing to do here.
534 } 528 }
535 529
536 } // namespace ash 530 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_background_view.h ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698