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

Unified Diff: ui/views/bubble/bubble_frame_view.cc

Issue 18003003: Message center re-organized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments applied Created 7 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
Index: ui/views/bubble/bubble_frame_view.cc
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index 7b011c549fd193dff4f3cb26d1a1a1edab73e196..083c88328503cb2548747e085e3c71615aba9d4f 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -79,7 +79,8 @@ BubbleFrameView::~BubbleFrameView() {}
gfx::Rect BubbleFrameView::GetBoundsForClientView() const {
gfx::Rect client_bounds = GetLocalBounds();
client_bounds.Inset(GetInsets());
- client_bounds.Inset(bubble_border_->GetInsets());
+ if (bubble_border_)
+ client_bounds.Inset(bubble_border_->GetInsets());
dewittj 2013/07/02 18:43:32 Why are you changing bubble_frame_view?
sidharthms 2013/07/02 21:01:16 Done. This was not meant to be part of the change.
return client_bounds;
}
@@ -110,7 +111,8 @@ int BubbleFrameView::NonClientHitTest(const gfx::Point& point) {
void BubbleFrameView::GetWindowMask(const gfx::Size& size,
gfx::Path* window_mask) {
- if (bubble_border_->shadow() != BubbleBorder::NO_SHADOW_OPAQUE_BORDER)
+ if (bubble_border_ &&
+ bubble_border_->shadow() != BubbleBorder::NO_SHADOW_OPAQUE_BORDER)
return;
// Use a window mask roughly matching the border in the image assets.
@@ -158,7 +160,8 @@ gfx::Size BubbleFrameView::GetPreferredSize() {
void BubbleFrameView::Layout() {
gfx::Rect bounds(GetLocalBounds());
- bounds.Inset(border()->GetInsets());
+ if (border())
+ bounds.Inset(border()->GetInsets());
// Small additional insets yield the desired 10px visual close button insets.
bounds.Inset(0, 0, close_->width() + 1, 0);
close_->SetPosition(gfx::Point(bounds.right(), bounds.y() + 2));

Powered by Google App Engine
This is Rietveld 408576698