#include "third_party/skia/include/effects/SkBlurImageFilter.h"
#include "ui/accessibility/ax_view_state.h"
#include "ui/aura/window.h"
-#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_delegate.h"
#include "ui/events/event.h"
virtual bool Contains(const gfx::Point& screen_point,
MouseEventType type) OVERRIDE;
private:
-
DISALLOW_COPY_AND_ASSIGN(MouseMoveDetectorHost);
};
mouse_actively_entered_(false) {
set_parent_window(parent_window);
set_notify_enter_exit_on_child(true);
- set_move_with_anchor(true);
set_close_on_deactivate(init_params.close_on_deactivate);
set_margins(gfx::Insets());
bubble_border_ = new TrayBubbleBorder(this, GetAnchorView(), params_);
void TrayBubbleView::SetArrowPaintType(
views::BubbleBorder::ArrowPaintType paint_type) {
bubble_border_->set_paint_arrow(paint_type);
+ UpdateBubble();
}
gfx::Insets TrayBubbleView::GetBorderInsets() const {
void TrayBubbleView::Init() {
BoxLayout* layout = new BottomAlignedBoxLayout(this);
- layout->set_spread_blank_space(true);
+ layout->SetDefaultFlex(1);
SetLayoutManager(layout);
}
-gfx::Rect TrayBubbleView::GetAnchorRect() {
+gfx::Rect TrayBubbleView::GetAnchorRect() const {
if (!delegate_)
return gfx::Rect();
return delegate_->GetAnchorRect(anchor_widget(),
mask->addRect(gfx::RectToSkRect(GetBubbleFrameView()->GetContentsBounds()));
}
-gfx::Size TrayBubbleView::GetPreferredSize() {
+gfx::Size TrayBubbleView::GetPreferredSize() const {
return gfx::Size(preferred_width_, GetHeightForWidth(preferred_width_));
}
-gfx::Size TrayBubbleView::GetMaximumSize() {
+gfx::Size TrayBubbleView::GetMaximumSize() const {
gfx::Size size = GetPreferredSize();
size.set_width(params_.max_width);
return size;
}
-int TrayBubbleView::GetHeightForWidth(int width) {
+int TrayBubbleView::GetHeightForWidth(int width) const {
int height = GetInsets().height();
width = std::max(width - GetInsets().width(), 0);
for (int i = 0; i < child_count(); ++i) {
- View* child = child_at(i);
+ const View* child = child_at(i);
if (child->visible())
height += child->GetHeightForWidth(width);
}