Index: ui/views/bubble/tray_bubble_view.cc |
diff --git a/ash/system/tray/tray_bubble_view.cc b/ui/views/bubble/tray_bubble_view.cc |
similarity index 95% |
rename from ash/system/tray/tray_bubble_view.cc |
rename to ui/views/bubble/tray_bubble_view.cc |
index 0578935cd06779c73dc924f657cb895c7f405990..d83055bef30b98d451d61c0b314741ad9c1c7575 100644 |
--- a/ash/system/tray/tray_bubble_view.cc |
+++ b/ui/views/bubble/tray_bubble_view.cc |
@@ -2,18 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "ash/system/tray/tray_bubble_view.h" |
+#include "ui/views/bubble/tray_bubble_view.h" |
-#include "ash/root_window_controller.h" |
-#include "ash/wm/property_util.h" |
-#include "ash/wm/shelf_layout_manager.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
#include "third_party/skia/include/core/SkColor.h" |
#include "third_party/skia/include/core/SkPaint.h" |
#include "third_party/skia/include/core/SkPath.h" |
#include "third_party/skia/include/effects/SkBlurImageFilter.h" |
-#include "ui/aura/root_window.h" |
-#include "ui/aura/window.h" |
#include "ui/base/accessibility/accessible_view_state.h" |
#include "ui/base/events/event.h" |
#include "ui/base/l10n/l10n_util.h" |
@@ -33,7 +28,7 @@ const int kBubbleSpacing = 20; |
} // namespace |
-namespace message_center { |
+namespace views { |
namespace internal { |
@@ -240,7 +235,7 @@ TrayBubbleView::InitParams::InitParams(AnchorType anchor_type, |
} |
// static |
-TrayBubbleView* TrayBubbleView::Create(aura::Window* parent_window, |
+TrayBubbleView* TrayBubbleView::Create(gfx::NativeView parent_window, |
views::View* anchor, |
Delegate* delegate, |
InitParams* init_params) { |
@@ -262,7 +257,7 @@ TrayBubbleView* TrayBubbleView::Create(aura::Window* parent_window, |
return new TrayBubbleView(parent_window, anchor, delegate, *init_params); |
} |
-TrayBubbleView::TrayBubbleView(aura::Window* parent_window, |
+TrayBubbleView::TrayBubbleView(gfx::NativeView parent_window, |
views::View* anchor, |
Delegate* delegate, |
const InitParams& init_params) |
@@ -307,10 +302,6 @@ void TrayBubbleView::InitializeAndShowBubble() { |
void TrayBubbleView::UpdateBubble() { |
SizeToContents(); |
GetWidget()->GetRootView()->SchedulePaint(); |
- aura::RootWindow* root_window = GetWidget()->GetNativeView()->GetRootWindow(); |
- ash::internal::ShelfLayoutManager* shelf = |
- ash::GetRootWindowController(root_window)->shelf(); |
- bubble_border_->set_paint_arrow(shelf->IsVisible()); |
} |
void TrayBubbleView::SetMaxHeight(int height) { |
@@ -319,6 +310,10 @@ void TrayBubbleView::SetMaxHeight(int height) { |
SizeToContents(); |
} |
+void TrayBubbleView::SetPaintArrow(bool paint_arrow) { |
+ bubble_border_->set_paint_arrow(paint_arrow); |
+} |
+ |
void TrayBubbleView::GetBorderInsets(gfx::Insets* insets) const { |
bubble_border_->GetInsets(insets); |
} |
@@ -398,4 +393,4 @@ void TrayBubbleView::ViewHierarchyChanged(bool is_add, |
} |
} |
-} // namespace message_center |
+} // namespace views |