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

Unified Diff: ash/system/palette/palette_tray.cc

Issue 2901273003: chromeos: Remove TrayBubbleView::Delegate::OnBeforeBubbleWidgetInit (Closed)
Patch Set: cleanup Created 3 years, 7 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698