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

Unified Diff: ash/system/tray/system_tray_bubble.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_bubble.cc
diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc
index b66e6013f8eb841abfc375c50714931c43c9829a..9d5cc95158d796fa32ba3b310381ccf6fd563de2 100644
--- a/ash/system/tray/system_tray_bubble.cc
+++ b/ash/system/tray/system_tray_bubble.cc
@@ -13,7 +13,6 @@
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/tray_bubble_wrapper.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
@@ -183,7 +182,8 @@ void SystemTrayBubble::UpdateView(
void SystemTrayBubble::InitView(views::View* anchor,
LoginStatus login_status,
TrayBubbleView::InitParams* init_params) {
- DCHECK(bubble_view_ == NULL);
+ DCHECK(anchor);
+ DCHECK(!bubble_view_);
if (bubble_type_ == BUBBLE_TYPE_DETAILED &&
init_params->max_height < kDetailedBubbleMaxHeight) {
@@ -191,8 +191,9 @@ void SystemTrayBubble::InitView(views::View* anchor,
} else if (bubble_type_ == BUBBLE_TYPE_NOTIFICATION) {
init_params->close_on_deactivate = false;
}
- bubble_view_ = TrayBubbleView::Create(
- tray_->GetBubbleWindowContainer(), anchor, tray_, init_params);
+ // The TrayBubbleView will use |anchor| and |tray_| to determine the parent
+ // container for the bubble.
+ bubble_view_ = TrayBubbleView::Create(anchor, tray_, init_params);
bubble_view_->set_adjust_if_offscreen(false);
CreateItemViews(login_status);
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698