Index: ash/system/palette/palette_tray.cc |
diff --git a/ash/system/palette/palette_tray.cc b/ash/system/palette/palette_tray.cc |
index e36b6806b6e442c305a5cb5e4d5a66a040d59cdf..d90e0ee0f90f3687526aaf5a9c2dd615e1826189 100644 |
--- a/ash/system/palette/palette_tray.cc |
+++ b/ash/system/palette/palette_tray.cc |
@@ -4,7 +4,6 @@ |
#include "ash/system/palette/palette_tray.h" |
-#include "ash/public/cpp/shell_window_ids.h" |
#include "ash/resources/grit/ash_resources.h" |
#include "ash/resources/vector_icons/vector_icons.h" |
#include "ash/root_window_controller.h" |
@@ -186,15 +185,13 @@ bool PaletteTray::ShowPalette() { |
init_params.can_activate = true; |
init_params.close_on_deactivate = true; |
- DCHECK(tray_container()); |
- |
// TODO(tdanderson): Refactor into common row layout code. |
// TODO(tdanderson|jdufault): Add material design ripple effects to the menu |
// rows. |
// Create and customize bubble view. |
- views::TrayBubbleView* bubble_view = |
- views::TrayBubbleView::Create(GetBubbleAnchor(), this, &init_params); |
+ views::TrayBubbleView* bubble_view = new views::TrayBubbleView( |
+ GetBubbleWindowContainer(), GetBubbleAnchor(), this, init_params); |
bubble_view->set_anchor_view_insets(GetBubbleAnchorInsets()); |
bubble_view->set_margins( |
gfx::Insets(kPalettePaddingOnTop, 0, kPalettePaddingOnBottom, 0)); |
@@ -304,16 +301,6 @@ base::string16 PaletteTray::GetAccessibleNameForBubble() { |
return GetAccessibleNameForTray(); |
} |
-void PaletteTray::OnBeforeBubbleWidgetInit( |
- views::Widget* anchor_widget, |
- views::Widget* bubble_widget, |
- views::Widget::InitParams* params) const { |
- // Place the bubble in the same root window as |anchor_widget|. |
- RootWindowController::ForWindow(anchor_widget->GetNativeWindow()) |
- ->ConfigureWidgetInitParamsForContainer( |
- bubble_widget, kShellWindowId_SettingBubbleContainer, params); |
-} |
- |
void PaletteTray::HideBubble(const views::TrayBubbleView* bubble_view) { |
HideBubbleWithView(bubble_view); |
} |